piątek, 31 marca 2017

python tricks - “_” operator.

t’s a useful feature which not many of us are aware.
In the Python console, whenever we test an expression or call a function, the result dispatches to a temporary name, _ (an underscore).


>>> 2 + 1
3
>>> print _
3
>>>

The “_” references to the output of the last executed expression.

Brak komentarzy:

Prześlij komentarz