Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think doing list(foo) to create a list copy is a pretty obvious way of getting around the 'variables are just references' thing.

I honestly have never seen someone do foo[:] just to copy a list, this is all news to me.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: