-4
A
回答
0
刚要回答,我看到的唯一问题:
我怎样才能输入姓名和地址信息转换成字典???
从python documentation借款词典:
>>> AddressDictionary = {'jack': "Jack's Address", 'jane': "Jane's Address"} # Create dictionary with some names and addresses
>>> AddressDictionary['John'] = "John's Address" # Add new address for John
>>> AddressDictionary
{'jane': "Jane's Address", 'John': "John's Address", 'jack': "Jack's Address"}
>>> AddressDictionary['jack'] # Fetch Jack's address
"Jack's Address"
>>> del AddressDictionary['jack'] # Delete jack and his address from the dictionary
>>> AddressDictionary['Harry'] = "Harry's Address" # Add Harry and his address
>>> AddressDictionary
{'jane': "Jane's Address", 'John': "John's Address", 'Harry': "Harry's Address"}
>>> AddressDictionary.keys() # Fetch all the names (keys) in your address dictionary
['jane', 'John', 'Harry']
>>> 'John' in AddressDictionary # Do you have John in your address book
True
相关问题
- 1. 使用Applescript从Mac地址簿中删除地址字段
- 2. 试图建立地址簿通过ABUnknownPersonViewController在iOS
- 3. iOS:地址簿
- 4. 地址簿peoplePickerNavigationController
- 5. iphone地址簿
- 6. iPhone地址簿搜索使用号码
- 7. 在Outlook VBA中使用地址簿
- 8. 使用json html的地址簿javascript
- 9. 使用AS3搜索outlook地址簿
- 10. 使用地址簿作为数据源
- 11. iOS 6地址簿无法使用?
- 12. 地址簿程序
- 13. IOS 6地址簿
- 14. 地址簿数据
- 15. 地址簿C#GUI
- 16. 地址簿教程
- 17. 地址簿程序
- 18. 建立电话簿搜索矢量使用地图库
- 19. 不创建地址簿对象
- 20. 使用ios5与ARC选择地址簿地址
- 21. iOS CLGeocode地址字典
- 22. iPhone地址簿 - 实际地址
- 23. Iphone,地址簿中的地址信息
- 24. 的iOS地址簿记录现有的地址簿数据库
- 25. iOS 8将地址簿添加到地址簿
- 26. 如何使用ios sdk从地址簿创建vCard?
- 27. Java地址簿字符串读取
- 28. 脚本通过地址簿访问自定义地址字段
- 29. 用PHP苹果地址簿创建的.vcf(如何构建UUID)
- 30. 我可以为iPhone设置一个独立的地址簿吗?