For some reason when I try to make a string lowercase and check for equality with the 'is' operator, it returns false.
I have tried converting the strings to ascii tuples and found that they still have the exact same numbers, and are the exact same type, but they still fail the test.
'HELLO'.lower() is 'hello' # False
'hello' is 'hello' # True
'HELLO'.lower() # 'hello'
x = 'HELLO'.lower()
x # 'hello'
x is 'hello' # False
tuple(map(lambda x: ord(x), 'hello')) # (104, 101, 108, 108, 111)
tuple(map(lambda x: ord(x), 'HELLO'.lower())) # (104, 101, 108, 108, 111)
tuple(map(lambda x: ord(x), 'hello')) is tuple(map(lambda x: ord(x), 'HELLO'.lower())) # False
Should these strings not be equal?