python中的print输出可以用逗号","

>>> a = 1
>>> b = 2
>>> print a,b
1 2

逗号分开的两个变量或者字符串之间隔一个空格

>>> print '100 + 200 =', 100 + 200
100 + 200 = 300

 

相关文章: