+ 1
What is meant by == in python3???
2 Answers
+ 6
Comparision operator
a = 20
if a == 'twenty':
print 'twenty'
else:
print 'string cannot be recognized'
0
with "=" you assign a value/create a variable.
with "==" you check for equality and returns a boolean value(True or False)
In english is something like:
for "="
x "is" 1
y "is" 2
for "=="
x "has the same value as" y?
with 2 possible answers "yes" (True) or "no" (False)