def begin():
response = input("Would you like to import a file? ")
response = response.lower()
if response is 'yes' or 'y':
return to_import()
else:
print("Bummer")
My goal is that only a yes or y response will return the function and start the rest of the program. Problem is that any response at the moment will initiate to_import().
Try separating the two conditions in the if statement: