>>> d = {‘a‘:1}
>>> print ‘%s‘ % 1,d
1 {‘a‘: 1}
>>> print ‘%s %s‘ % 1,d
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: not enough arguments for format string
原文:http://www.cnblogs.com/ghgyj/p/3997577.html