【发布时间】:2012-08-01 01:46:55
【问题描述】:
在Python中,写起来很乏味:
print "foo is" + bar + '.'
我可以在 Python 中做这样的事情吗?
print "foo is #{bar}."
【问题讨论】:
-
我想我找到了解决方案,你会检查一下吗? stackoverflow.com/questions/16504732/…
标签: python ruby string-formatting string-interpolation language-comparisons