I'm trying to make this code work but I can't seem to find the right solution.
while True:
tname = input("Please enter the unit of the temperature: ")
list=["Celsius","Kelvin","Fahrenheit"]
if tname == list[0] or list[1] or list[2]:
break
elif tname is not list[0] or list[1] or list[2]:
print("Not a valid unit. Please try again.")
I want the program to stop whenever either Celsius, Kelvin or Fahrenheit is typed but the program stops regardless of what I write. Do you guys know to fix it? Thanks in advance