I have a function that asks for the person their first and last name and then prints their age but i am having trouble entering the if statement, it is always skipping it.
My dictionary prints like this on the command line: {(‘name’,’subname’):19)}
l_name = raw_input("Enter last name")
f_name = raw_input("Enter first name")
if (l_name, f_name) in my_dict.items():
age = my_dict[l_name,f_name]
print age
thanks in advance
Try this:
See it working online: ideone