Variables
- Template variables are defined by dictionary concept in python.
- {{variable_name }} is the syntax used by the template to print the value.
- Dot operator is used to access attributes of a variable.
Example
- {{ IITM.course1 }}
- {{ IITM['course1'] }}
If Jinja identifies an evaluation statement with an undefined variable, it will replace it with an empty string.
python variable code
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Output
- Course MAD1 is available Programming course in the IITM datacenter.
Reference
Authors(Git):Devi(97.14%), Thejesh GN(2.86%)