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
2 Respuestas
+ 2
listoftuple = [("May",35),("John",31)]
name = input()
for man in listoftuple:
if man[0] == name:
print(man[0] + " is " + str(man[1]))
0
First share your attempt and don't make duplicate question
https://www.sololearn.com/discuss/1316935/?ref=app
https://www.sololearn.com/discuss/333866/?ref=app
https://www.sololearn.com/discuss/2741304/?ref=app