You are viewing a single comment's thread. Return to all comments →
Here is another solution like the concept of Boolean properties but based on assigned priorities (with int) and within a function :
def getKey(x): if x.islower(): return(1,x) elif x.isupper(): return(2,x) elif x.isdigit() : if int(x)%2==1: return(3,x) else : return(4,x) print(*sorted(input(),key=getKey),sep='')
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 →
Here is another solution like the concept of Boolean properties but based on assigned priorities (with int) and within a function :