在python中 , 我們若要將輸入的內容一行行的讀取 ,
可以使用splitlines()這個method ,
for example :
infors=str(execSystemCmd('cat /etc/hosts')).splitlines()
for line in infors:
print line
文章標籤
全站熱搜
在python中 , 我們若要將輸入的內容一行行的讀取 ,
可以使用splitlines()這個method ,
for example :
infors=str(execSystemCmd('cat /etc/hosts')).splitlines()
for line in infors:
print line

KwCheng's blog
JerryCheng 發表在 痞客邦 留言(0) 人氣(41)
