I need to do a recursive function that counts from 1 to a number entered by the user.
I have this:
def contador(num):
#caso base
if num == 1:
return num
else:
return contador(num)
num=int(input("Hasta que número quieres llegar ?"))
print (contador(num))