You are viewing a single comment's thread. Return to all comments →
My code . It passed the test but I think it would take too much time to run if the data input is large
import re patterns = [ r'[a-z]', r'[A-Z]' , r'[13579]' ,r'[02468]'] data = input() t = [ r for pattern in patterns for r in sorted(re.findall( pattern, data )) ] print("".join(t))
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 →
My code . It passed the test but I think it would take too much time to run if the data input is large