You are viewing a single comment's thread. Return to all comments →
string = input() ascii = list(chr(i) for i in range(128)) lower = sorted([s for s in string if s in ascii[97:123]]) upper = sorted([s for s in string if s in ascii[65:91]]) odd = sorted([s for s in string if s in ascii[48:58] and int(s) % 2 != 0]) even = sorted([s for s in string if s in ascii[48:58] and int(s) % 2 == 0]) print("".join(lower + upper + 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 →