3 ms·
There are more than a few interesting points in here but this is funny to me coming from someone who is seemingly well versed in python: Mistake #5 numbers = [
by dmritard96 12y ago
There are more than a few interesting points in here but this is funny to me coming from someone who is seemingly well versed in python:
Mistake #5
numbers = [n for n in range(10)]
this should be:
range(10)
- abaschin 12y agonot in Python 3, where range() replaces xrange()
- dmritard96 12y agointeresting, haven't written in python 3 yet
- dragonwriter 12y agoUnless its Python 3.x. Though, really, even there, while the list comprehension works, its kind of an awkward construction to use that instead of: numbers = list(range(10))