read a file line by line with a while loop : Loop through : File PYTHON TUTORIALS


PYTHON TUTORIALS » File » Loop through »

 

read a file line by line with a while loop


f = open('script1.py') 
while True: 
    line = f.readline(  ) 
    if not line: break 
    print line.upper(  ),



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo File
» Loop through