de un numero entero ordenar de forma ascendente los digitos
def ascend(num): # convert number to a string num = str(num) # convert to a list num = list(num) # sort num.sort() # convert to string num = "".join(num) # convert to int num = int(num) return num ascend(123)