Is the behaviour described below by purpose (Python 3.7) ?
_ = '==TEST=='
_.startswith('==')
Out[29]: True
_
Out[30]: True
l = '==TEST=='
l.startswith('==')
Out[26]: True
l
Out[27]: '==TEST=='
I know the variable names are a poor choice but why does the call to .startswith override the variable _ ?
When you run python in interactive mode it stores the value of each expression you evaluate into the underscore variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With