You are viewing a single comment's thread. Return to all comments →
S = input().strip() low = [] upp = [] even = [] odd = [] for char in sorted(S): if char.isdigit(): (odd if int(char)%2 == 1 else even).append(char) else: (low if char.islower() else upp).append(char) print(''.join(low+upp+odd+even))
Seems like cookies are disabled on this browser, please enable them to open this website
ginortS
You are viewing a single comment's thread. Return to all comments →