Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- name,age,phone
- marta,30,12345
- bob,22,33555
- alice,55,1939
- data = {}
- with open(path) as f:
- reader = csv.reader(f)
- i = 0
- for row in reader:
- i += 1
- data[i] = {'name': row[0], 'age': row[1], 'phone': row[2]}
- data[1] = {name: marta, age: 30, phone: 12345}
- data[2] = {name: bob, age: 22, phone: 33555}
- data[3] = {name: alice, age: 55, phone: 1939}
- {% for details in data %}
- <tr>
- <td>{{ details.name }}</td>
- <td>{{ details.age }}</td>
- <td>{{ details.phone }}</td>
- </tr>
- {% endfor %}
Add Comment
Please, Sign In to add comment