I've been trying to solve this simple puzzle for hours, I'm new to python and the idea with this function is to be able to validate that the input corresponds to a numerical value and that otherwise restart the system, I can't get the function to return the value as it should and That is why I ask for your collaboration, without further ado, thank you very much.
import json
def cantidad_alumnos_cargar():
try:
a = int(input("Cantidad de alumnos a cargar: "))
return a
except:
print("pone numeros!")
cantidad_alumnos_cargar()
print(cantidad_alumnos_cargar())