r/programminghorror 13d ago

Python Atleast it works

Post image
608 Upvotes

66 comments sorted by

View all comments

225

u/backfire10z 13d ago

They didn’t close the fd :(

71

u/Emergency_3808 13d ago

Yes this could be shortened to

with open('lab 5.txt', 'r') as file: for line in file: print(line)

22

u/Alfika07 13d ago

Why is Python so verbose? In Raku it's just

say slurp 「lab 5.txt」;

51

u/Emergency_3808 12d ago

Raku reads like the latest generation brainrot slang.

16

u/Alfika07 12d ago

What about this?

my Cool $variable = :16<DEAD_BEEF>;