字典实战应用,笨方法学python
2017-03-15 22:28
218 查看
#coding=utf-8 #creat a mapping from child to account_name children = { 'Hannibal': 'Des001', 'Shmily': 'Angel136', 'James': 'Feng128', 'Jayden': 'Luo125', } #Creat a basic set of account and passwords accounts = { 'Des001': 'Hannibal01', 'Angel136':'Shmily01', 'Feng128': 'James01', 'Luo125': 'Jayden01', } print "Please input children\'s name:" next = raw_input(">") print " the %s account information is: %s, and the pw is %s" % (next, children[next], accounts[children[next]])
相关文章推荐
- python 字典(dict)get方法应用
- Python字典get()方法的实际应用
- python 字典(dict)get方法应用
- Python字典get()方法的实际应用
- Python(列表操作应用实战)方法二
- python---语句与数据结构应用,迭代、迭代字典、字典排序、字典根据键值查找键、sorted排序方法、translate与maketrans、with语句
- 在Python中使用defaultdict初始化字典以及应用方法
- Python字典的应用详解
- 遍历python字典几种方法
- python实战--web.py实战(开发新浪微博应用)
- python 字典 get方法
- Python字典应用的一个例子
- 遍历python字典几种方法 分类: python 2013-01-22 13:40 332人阅读 评论(0) 收藏
- Python 列表和字典的一些方法
- Python的字典get方法:从字典中获取一个值
- Python列表和字典的方法总结
- 遍历python字典的几种方法
- python中的字典clear方法
- 遍历python字典几种方法
- Python字典的应用详解[转载]