Hi, I'm working on the following menu, in which when option 1 is chosen and the patient identifier that is entered is> 3500, that error will be printed on the screen and a new identifier will be requested again
I tried to do it with label and goto but I think that python has not implemented it and I do not know how to do something similar so that it is asked to enter a new identifier until it is correct
while True:
print('1)Datos del paciente')
print('2)Resumen de variable')
print('3)Volver')
opc=input('Elija una opción: ')
if opc=='1':
identificador_paciente=int(input('Introduzca un identificador de paciente: '))
if 1<=identificador_paciente<=3500:
print ('hola')
else:
print('Lo siento, el identificador de paciente introducido no es válido')