Arithmetic Expression
- Upto now we have seen variables assigned to string values.
- Jinja2 supports other data types too.
- Let's use integers to perform a arithmetic calculation.
- Adding {{ X }} and {{ Y }} equals {{ X + Y }}.
- The values assigned to the variables are integers.
- Below example describes it.
python code for Arithmetic Expressions
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Output
- Adding 7 and 8 equals 15
Authors(Git):Devi(96.77%), Thejesh GN(3.23%)