I have two strings that I compare, but I am not getting the result I want. Here's how I do it, with Python 2.7:
str1 = '0000644'
str2 = '0000644'
if str1 == str2:
print 'true!'
else:
print 'false'
I have also tried with the is
comparison:
if str1 is str2:
print 'true'
else:
print 'false'
Can someone explain why I am not printing true when I do this? I come from C#, and if you do it like this you should print the true value.