close
在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