print后面的加逗号

print后面加上逗号,打印不换行
 for  line in open('log.txt').readlines():
 print line
 
0 1 2
(0, 1, 2)
3234243
1
asdf
1 2 4
spam
for  line in open('log.txt').readlines():
 print line,
 
0 1 2
(0, 1, 2)
3234243
1
asdf
1 2 4
spam
>>>

你可能感兴趣的:(职场,print,休闲,逗号)