You are viewing a single comment's thread. Return to all comments →
inp= input() lower= [i for i in inp if i.islower()] lower.sort() upper= [i for i in inp if i.isupper()] upper.sort() digits= [int(i) for i in inp if i.isdigit()] digits_even= [i for i in digits if i%2 == 0] digits_even.sort() digits_odd= [i for i in digits if i%2 != 0] digits_odd.sort() print(''.join(lower + upper + list(map(str, digits_odd)) + list(map(str, digits_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 →