Friends help me with this question that they left me in a workshop, I've really tried but it does not give me, I tried this:
def invertida(n):
"""
problema: recibir un numero de 4 cifras y devolver sus cifras invertidas
entrada: numero
salida: numero invertido
"""
numero = (n[::-1])
return numero
invertida(1234)
but that of [::-1]
does not give me and I would like the person to enter exactly 4 digits, neither more nor less, but I do not know how: (