Feb-25-2026, 10:09 AM
I saw this today for opening a text file:
Is it OK to do this? How can it work?
with open(file) as f:
lines = list(f)Never seen that before, I only know readlines(), which delivers the same thing, I think!?Is it OK to do this? How can it work?
