You are viewing a single comment's thread. Return to all comments →
s = input() lettersU = [x for x in s if x.isalpha() and x.isupper()] lettersL = [x for x in s if x.isalpha() and x.islower()] numbersO = [x for x in s if x.isnumeric() and int(x)%2 != 0] numbersE = [x for x in s if x.isnumeric() and int(x)%2 == 0] wynik = "".join(sorted(lettersL))+"".join(sorted(lettersU))+"".join(sorted(numbersO))+"".join(sorted(numbersE)) print(wynik)
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 →