(May-08-2017, 12:07 AM)Joseph_f2 Wrote:I was planning to point it out - but got distracted. Those 2 lines are absolutely redundantfor x in range(0, 16): data.append(x)
data = list(range(16))does the trick. (One of the few things from Scala/Java I personally miss in Python -
toList
method )
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.