Hello, we started a programming club at school and I was teaching a guy about dictionaries today and we came across something weird.
>>> dict={'John':6,'Bob':3}
>>> if dict.has_key('Bob')==True:
print "hello"
hello
>>> 'Bob' in dict
True
>>> if 'Bob' in dict == True:
print "Bob is in the dictionary"
>>> WHY IT DOESNT SAY BOB IN DICTIONARY!!!!!
'Bob' in dict returns true, why doesnt it print 'Bob is in the
dictionary'
...Code formatting not very readable -.-