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

Point 3 of the iteration part is not good advice. With [1:] you're making a copy of the list just to iterate over it...


You're right. I still wouldn't recommend looping over indices, but rather using itertools.islice(xs, 1, None) instead of xs[1:].


You're right... But at least it's a shallow copy.




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

Search: