r/programminghorror • • Oct 26 '26

Python I love Python

305 Upvotes

81 comments sorted by

View all comments

Show parent comment

3

u/gundam1945 Oct 27 '26

The explanation makes sense but the behavior is probably not expected. Though if I need to add to a list I usually make the variable outside first and extend in the function.

Never encounter such a use case in this example.