Todo list with conditions

Report a typo

Let's assume that you pass such a context to a template:

todos = [{'important': True, 'task': 'take a nap'}, {'important': False, 'task': 'get a coffee'}, {'important': True, 'task': 'learn a topic on the Hyperskill']

Use a for loop statement to show only the important tasks.

Write a program in Python 3
template = """
<html>
<ul>
{% %}
<div>
{% %}
{{ }}
{% %}
</div>
{% %}
</ul>
</html>
"""

Create a free account to access the full topic