Output Tuple
In the course "" this question ist asked: ################### 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 ################### As solution, this solution ist posted: ################### name = input() for x in contacts: if name in x: print(str(x[0]) + " is " + str(x[1])) break else: print("Not Found") ################### But this doesn't work, because in every case, the "Not Found" message is posted once. The question don't want to get a "Not Found", if a Name is found. How can I get the solution for it?