Python Program to arrange sorted alpha numeric string
def arrangeString(str): # split() returns list of strings # separated by given separator. temp = str.split(' ') print(temp) # now sort temp list temp.sort() # join list elements to string res = ' '.join(temp) print(res) arrangeString('H31 10 23 P')