Python 官方文档:入门教程 => 点击学习
(helloworld) [root@iZ2ze7qh7q0di3qkvef1dzZ ~]# more dic_test.py#!/usr/bin/pythoninfo ={}name=raw_input("Please inpu
(helloworld) [root@iZ2ze7qh7q0di3qkvef1dzZ ~]# more dic_test.py
#!/usr/bin/python
info ={}
name=raw_input("Please input name: ")
age=raw_input("Please input age: ")
gender=raw_input('please input(M/F): ')
info['name']=name
info['age']=age
info['gender']=gender
for k,v in info.items():
print "%s:%s" % (k,v)
print 'main end'
--结束END--
本文标题: python字典的小例子
本文链接: https://www.lsjlt.com/news/229878.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0