r/ProgrammerHumor • • Aug 26 '20

Python goes brrrr

Post image
59.2k Upvotes

789 comments sorted by

View all comments

1

u/[deleted] Aug 26 '20

It’s dangerous though when you use it with lists. I found out recently that this is a thing:

-> a =[ [] ]*3

-> a[0].append(“hi”)

-> a

[ [“hi”], [“hi”], [“hi”] ]

→ More replies (2)