ungleich-learning-circle/balazs/python-the-hard-way/ex23/notes

33 lines
727 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

* Questions:
** How does the program reads the file?
readline
** How does it loops over the lines?
readline will return an empty string when no more data is available
*** https://stackoverflow.com/questions/28936140/use-readline-to-read-txt-file-python3
** Why doesnt he uses a for loop? (instead of return) -later
Good to know:
"The second method still reads the file line by line and does not load the whole file into memory, right? nishant Nov 14 '19 at 7:24"
"@nishant correct Ilan Kleiman Dec 15 '19 at 1:42"
** What is "with" in python? -later
** Why should I use builting python utils instead of *nix utils? -later
* Notes:
strip: for text formatting
* Log:
Takes a long time to watch the video.