python3.5 字典遍历

1、遍历字典

dict={'a': '1', 'b': '2', 'c': '3'}
for key in dict:
    print(key+':'+dict[key])


ssh://root@192.168.0.204:22/usr/bin/python -u /home/progect/app/py_code/test1.py
a:1
b:2
c:3

Process finished with exit code 0

 

posted @ 2018-12-09 20:57  effortsing  阅读(215)  评论(0编辑  收藏  举报