close

一般如果需要用到print 直接print空一格就能用了

 

print "abcdefg"

 

但如果要用到print()函數的額外功能,就必須要引用這個函數

from __future__ import print_function

 

這時才能用sep end file flush 等功能

print("abc","def", sep="  ",end="\n",file=sys.stdout,flush=False)

arrow
arrow
    全站熱搜
    創作者介紹

    工程師黑田 發表在 痞客邦 留言(0) 人氣()