Jun-09-2020, 03:26 AM
I am playing around with the idle again and am wondering how to best use the .get.
here is the code I'm messing around with.
I hope I tagged correctly this time.
here is the code I'm messing around with.
people = { 'howard' :'father', 'maria' :'mother', 'anthony' : 'child', } name = input('enter your name here: ') while name != 0: print('') if name in people: print('hello ' + people.get(name) ) break elif name not in people: print(name + 's not here man') break#why does this print out 'hello father' and not hello howard?
I hope I tagged correctly this time.