Generation

generate functionMon, 27 Mar 2023

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)

Want to kickstart your project?Use the new AI Studio to create your code