Macros
- Macros are comparable with functions in regular programming languages.
- They are represented as inline functions. Once macros are defined, the names of the macros can be inserted in places where they are required.
- In the following code, name of the macro is macro_name.
- A for loop is used to display the items of the data defined in dictionary.
- The macro is used inside the for loop to display the items in the dictionary.
python code for Macro
1 2 3 4 5 6 7 8 9 |
|
Output
- Available Devices are New laptop devices, New desktop devices, New printer devices, New card devices, New voice devices,
Reference
https://jinja.palletsprojects.com/en/2.10.x/templates/
Authors(Git):Devi(96.55%), Thejesh GN(3.45%)