我可能有一个愚蠢的问题:
x = {'a':1,'b':2,'c':3} print "%(a)s" % x # works fine print "%('a')s" % x # failed
有人能告诉我为什么吗?
python python-2.7
python ×1
python-2.7 ×1