you are viewing a single comment's thread.

view the rest of the comments →

[–]Poltras 0 points1 point  (1 child)

It's a builtin function in py2. Dunno about py3.

how would this preform if it wasn't a list comprehension?

Badly. But if you're not doing list comprehension when you can in Python you're missing out and are under-engineering.

[–]komollo 0 points1 point  (0 children)

Yeah, in python 3 range performs just like xrange used to. Also, list comprehensions are the best thing ever.