python換行按哪個鍵?
在一行結尾加上'\',例如:
data11=data21=data31=data41=data51=data61=data71=data81=data91= data101=data111=data121=data131=data141=data151=data161=data171=data181=data191=data201=data211=pd.DataFrame(columns['w','ka','period'])#o##>#1#這一行的程式太長,換行續寫如下:
data11=data21=data31=data41=data51=data61=data71=data81\ =data91=data101=data111=data121=data131=data141\ =data151=data161=data171=data181=data191=data201=data211\ = pd.DataFrame(columns=['w','ka','period'])
如果是以逗號連接的,可以不加'\',例如:
datas1 = [data11, data21, data31, data41, data51, data61, data71, data81, data91, data101, data111,data121, data131,data141,data151,data161,data171, data181,data191,data201,data211]
如:
>>> print 'aaa'; \ ... print 'bbb'; \ ... print 'ccc'
也附註:
\ :連接目前行與下一行的字元
/ :除法
##//:強行整除 %:取餘以上是python換行按哪個鍵的詳細內容。更多資訊請關注PHP中文網其他相關文章!