Looping Over Characters with read : File Read : File PYTHON examples


PYTHON examples » File » File Read »

 

Looping Over Characters with read



f = open("fileName")
char = f.read(1)
while char:
    process(char)
    char = f.read(1)

f.close()
           
       



Leave a Comment / Note


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


PYTHON examples

 Navioo File
» File Read


Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0