【发布时间】:2014-03-06 19:16:47
【问题描述】:
我愿意
print [1,2]
但我希望打印以 [1,2] 格式输出 逗号后没有多余的空格。
我需要一些“stdout”功能吗?`
Linux2 上的 Python 2.7.5+(默认,2013 年 9 月 19 日,13:48:49)[GCC 4.8.1]
【问题讨论】:
-
试试 str.join docs.python.org/2/library/stdtypes.html
标签: python list python-2.7 printing format