Skip to content

Comment on Python: copying a list the right way

Comments

I'm always wondering why people have to write 3 pages instead of getting to the point. You know like, just a list.

- a = b <= doesn't copy! its just a reference

- a = list(b) <= works!

- <other methods if you like>

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.