python的map遍历代码
好久没有用python了,感觉基本的语法都生疏了,比如map的遍历:)python 代码
[*]例 6.10. 遍历 dictionary
[*]
[*]>>> import os
[*]>>> for k, v in os.environ.items(): 1 2
[*]... print "%s=%s" % (k, v)
[*]USERPROFILE=C:\Documents and Settings\mpilgrim
[*]OS=Windows_NT
[*]COMPUTERNAME=MPILGRIM
[*]USERNAME=mpilgrim
详细参考 www.woodpecker.org.cn/diveintopython/file_handling/for_loops.html
页:
[1]