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
原文地址:https://www.cnblogs.com/effortsing/p/10093198.html