Mar-27-2019, 12:37 AM
Haven't had a chance yet to review this but my very smart roommate said something I imagine is helpful:
Mikel Wrote:According to dis.dis(lambda: 'a' in 'ab' == True), ('a' in 'ab' == True) is equivalent to ('a' in 'ab' and 'ab' == True)
I think I know why: comparisons in Python are allowed to written similar to what we do naturally
So x < y < z is valid and equivalent to x < y and y < z
The 'in' operator is treated equivalently to '<', '==', etc.
So x in y == z is equivalent to x in y and y == z
Mystery solved