names = ["Carter", "David", "Jogn"] name = input("Name: ") for n in names: if name == n: print("Found") break print("Not found")