The Python Oracle

What is the perfect counterpart in Python for "while not EOF"

Become part of the top 3% of the developers by applying to Toptal https://topt.al/25cXVn

--

Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles

--

Chapters
00:00 Question
00:31 Accepted answer (Score 242)
01:26 Answer 2 (Score 78)
03:07 Answer 3 (Score 19)
03:39 Answer 4 (Score 14)
03:55 Thank you

--

Full question
https://stackoverflow.com/questions/1559...

Answer 1 links:
[read a buffer]: https://docs.python.org/3/library/io.htm...
[no eof test]: http://mail.python.org/pipermail/python-...
[assignments are not allowed in expressions]: http://docs.python.org/2/faq/design.html...
[assignment expressions]: https://www.python.org/dev/peps/pep-0572...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#python #file #iteration #eof

#avk47