I'm using ternary operator for short conditional variable definition. I was wondering when the expression returned True instead given in the expression value.
>>> digits = '123456'
>>> conv_d = digits != None if int(digits) else None
>>> conv_d
>>> True
>>> int(digits)
>>> 123456
Explain to me please, how this happens? What is the logical difference between a ternary operator and regular conditional expression in Python?