Why isn't it true?


s1 = "Welcome to Python"
s2 = s1
s3 = “Welcome to Python”

s1 == s2

s1 == s3
False (???why is this false??? Don’t they point to the same object?)


=== doesn’t exist within python, == is for comparison or the is keyword (you can check the documentation how it works)

i am unsure how python handles ===, its really uncommon to do this in python


Sorry, do you mean === (3 equal signs) or do you mean == (2 equal signs)?


i think its in my answer?

so === can’t be used (that is 3 equal signs)

for comparison, we can either use == or is keyword. But this is all in my original answer?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.