首页 > 代码库 > python 输出字符串如果遇到字典

python 输出字符串如果遇到字典

>>> d = {a:1}>>> print %s % 1,d1 {a: 1}>>> print %s %s % 1,dTraceback (most recent call last):  File "<stdin>", line 1, in <module>TypeError: not enough arguments for format string

 

python 输出字符串如果遇到字典