Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Luyt
on Nov 6, 2011
|
parent
|
context
|
favorite
| on:
Python: copying a list the right way
I went through my code and discovered that I seldom copy lists. I
do
often make selections from lists in a new list, i.e:
b = [x for x in a if somecondition(x)]
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: