I want this loop to break when user enters anything but y or Y. But, instead the Enter the new location prompt is returning again and again.
def add_locations(self):
while True:
new = str(input("Enter the new loation: "))
self.locations.append(new)
ask = str(input("add new location? (y/n): "))
if ask == 'y' or 'Y':
continue
else:
break