listing11-7.py 115 B

12345
  1. with open(filename) as f:
  2. while True:
  3. char = f.read(1)
  4. if not char: break
  5. process(char)