In this code, I wanted to identify a member with his ID. If the ID exist in the dictionary, I would like to print the fullname of this member
iin = input('Enter your ID :')
dict = {'id' : ['aa', 'bb', 'cc'],
'Firstname' : ['Mark', 'Jamal', 'Van'],
'Lastname' : ['Roch', 'borh', 'nilsa']}
for d in dict:
if inn in d:
print('Hello,', dict[inn])
else :
print('Sorry, you are not a member')
The desired result
Enter your ID : aa
Hello, Mark Roch
Thank you for the help