0

Hey guys help me please

You are given a list of contacts, where each contact is represented by a tuple, with the name and age of the contact. Complete the program to get a string as input, search for the name in the list of contacts and output the age of the contact in the format presented below: Sample Input: John Sample Output: John is 31

31st Mar 2021, 8:34 AM
Wangzi
2 odpowiedzi
+ 2
listoftuple = [("May",35),("John",31)] name = input() for man in listoftuple: if man[0] == name: print(man[0] + " is " + str(man[1]))
31st Mar 2021, 12:11 PM
Илья Мирошник
Илья Мирошник - avatar