you are viewing a single comment's thread
view the rest of the comments
[–] 6 points 1 year ago

Walrus is more useful in a while loop.

while (data := f.read(1024)):
    pass
  • source
  • parent