Interesting post! At work, I'm often just looking for quick ways to parse a one-off dataset or other small things like that, and it doesn't have to be readable or maintained by anyone but myself, so I use several of these (admittedly non-Pythonic) schemes. Writing for a team is different. This is still quite useful, especially to learn the extent of some of the nuanced features that this language has. Cheers.
print(*range(1,5)) didn't work for me (running Python 3.10), but Walrus:= taught me a new trick and I will definitely be using it.
Interesting post! At work, I'm often just looking for quick ways to parse a one-off dataset or other small things like that, and it doesn't have to be readable or maintained by anyone but myself, so I use several of these (admittedly non-Pythonic) schemes. Writing for a team is different. This is still quite useful, especially to learn the extent of some of the nuanced features that this language has. Cheers.
print(*range(1,5)) didn't work for me (running Python 3.10), but Walrus:= taught me a new trick and I will definitely be using it.
Glad I could help. Thanks for reading