Looping Over Characters with read Writing the Loop Differently
f = open("filename") while 1: char = f.read(1) if not char: break process(char) f.close()
1. | Writing to Files | ||
2. | File writelines(list) | ||
3. | File write(string) | ||
4. | File Output | ||
5. | Writes the contents of string to the file |