首页 > 代码库 > [python] python 中的" "和' '都是完全转义

[python] python 中的" "和' '都是完全转义

dict = {"a" : "apple", "b" : "banana", "g" : "grape", "o" : "orange"}

for k in dict:
    print ("dict[$k] =",dict[k])

dict[$k] = grape
dict[$k] = banana
dict[$k] = apple
dict[$k] = orange

 

dict = {"a" : "apple", "b" : "banana", "g" : "grape", "o" : "orange"}

for k in dict:
    print ("dict[%s] =" %k,dict[k])

dict[o] = orange
dict[a] = apple
dict[b] = banana
dict[g] = grape

[python] python 中的" "和' '都是完全转义