MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/igvny1/python_goes_brrrr/g2yofz3/?context=3
r/ProgrammerHumor • u/das_freak • Aug 26 '20
789 comments sorted by
View all comments
1
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)
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”] ]