命名元组nametuple
2024-09-04 23:08:06
# coding:utf-8
from collections import namedtuple
Student = namedtuple('Student', ['no', 'name', 'age', 'sex'])
student = Student("2016214338", u"张三", 19, u"男")
print student.name
print student.age
-----结果显示--------------------
张三
19
最新文章
- 当div有边框图片的时候,怎么实现内部的p标签的水平和垂直居中
- SQL Server 2008 R2 下移动数据库的存储位置
- 【bzoj1042】 HAOI2008—硬币购物
- Lazarus for Raspbian安装
- UVa 11624,两次BFS
- 《梦断代码》读书笔记第0篇——“软件时间”、“死定了”、“Agenda之魂“
- 安装sybase12.0,运行时报错异常。
- Dubbo -- 系统学习 笔记 -- 示例 -- 参数验证
- ORACLE EHCC(exadata hybrid columnar compression)
- [ 高危 ]mt某站SQL注入
- Redis开启AOF导致的删库事件
- 【JavaScript从入门到精通】第二课 初探JavaScript魅力-02
- Machine Learning--week3 逻辑回归函数(分类)、决策边界、逻辑回归代价函数、多分类与(逻辑回归和线性回归的)正则化
- 进程池的同步方法 pool.apply
- 使用json通过telegraf生成metrics(摘自telegraf github文档)
- null和System.DBNull.Value的区别
- 精巧好用的DelayQueue
- [JQuery插件系列]-强烈推荐10个非常不错的jQuery工具提示插件
- python webdriver中对不同下拉框通过文本值的选择
- linux-2.6.22.6内核启动分析之Makefile文件
热门文章
- webpack 代理问题
- abp demo运行1
- 四种webAPP横向滑动模式图解—H5页面开发
- Codeforces Round #602 (Div. 2, based on Technocup 2020 Elimination Round 3) B	 Box
- CF399B Red and Blue Balls
- 怎么解析后台返回数据中\r\n换行
- [CF276B] Little Girl and Game
- [luogu3950] 部落冲突 - Link Cut Tree
- JAVA 注解教程(二)元注解
- codeforces 1284C. New Year and Permutation(组合数学)