(Jun-17-2018, 03:42 PM)Nwb Wrote: _ is also assigned the last mathematical call (ex: 2+2, _ is 4) in IDLE. _ should never be used as a variable.
It is assigned the value of the last executed expression that produces result which is not
None
- e.g. print
and assignment will not set _
. It is often used as a placeholder variable by some people with some experience (me among them) - e.g., in IDEs it will prevent linters from screaming at you that you create an unused variable.Please, try to grow beyond the newbie level before making sweeping statements
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.