name = input("Name of patient: ")
birth_year = int(input("Birth year of patient: "))
age = 2021 - birth_year
previous_patients = ["John Smith", "Allen Mincer", "Ron Fritz"]
print("Patient " + name + " is " + str(age) + " years old")
if name == list(previous_patients):
print("Registered")
else:
print("New")
I want it to print out "Registered" if the name from the input matches a name in previous_patients
I've spent a couple of hours on it and can't figure it out, thanks.