(helloworld) [root@iZ2ze7qh6q0di3qkvef1dzZ ~]# 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'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/20893244/viewspace-2220461/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/20893244/viewspace-2220461/