django 模板(template)中操作 python tuple
2015-07-31 10:23
573 查看
python tuple and list 在django template中的使用如下所示:
mylist = [(a, b, c), (x, y, z), (l, m, n)] {% for item in mylist %} {{ item.0 }} {{ item.1}} {{ item.2 }} {% endfor %}
相关文章推荐
- 【python】 [基础] 数据类型,字符串和编码
- Python 金融数据分析库及相关框架
- [Python]抓取豆瓣电影列表的标题
- 基础知识:python模块的导入
- 基础知识:python模块的导入
- 树莓派用Python写几个简单程序
- Python 性能分析模块
- python的xlrd模块(读取excel表格)
- Python 实用命令
- 简单理解Python中的装饰器
- python模块学习
- 第一章:绪论-Python开发工具的安装
- 实践,用tornado实现自定义协议server
- gunicorn、uwsgi性能测试
- Python学习笔记-Python跟web开发
- Python学习笔记-web开发
- Python进阶之匿名函数
- python库
- Python新式类和经典类的区别
- python __new__以及__init__