+ 1

What is meant by == in python3???

23rd Mar 2017, 9:34 AM
Sajid Khan
Sajid Khan - avatar
2 Answers
+ 6
Comparision operator a = 20 if a == 'twenty': print 'twenty' else: print 'string cannot be recognized'
23rd Mar 2017, 10:26 AM
Animesh
Animesh - avatar
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)
24th Apr 2017, 5:12 PM
Alin Climente
Alin Climente - avatar