标签:
[root@localhost test1]# vim 4.py //ADD #!/usr/bin/python info = {} name = raw_input("Please input a name: ") age = raw_input("Please input your 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‘ [root@localhost test1]# python 4.py Please input a name: Mike Please input your age: 30 Please input (M/F): M gender: M age: 30 name: Mike main end
标签:
原文地址:http://www.cnblogs.com/frankielf0921/p/5839207.html