You are viewing a single comment's thread. Return to all comments →
I am able to solve this in python
import re import sys def process_input(s_input): operation, type, words = map(str, s_input.split(';')) if operation == 'S': a = re.sub('([A-Z])', r' \1', words).lower().split() if type == 'M': a = a[:-2] print(" ".join(a)) if operation == 'C': a = words.title().replace(' ', '') if type == 'V': a = a[:1].lower() + a[1:] elif type == 'M': a = a[:1].lower() + a[1:] + '()' print(a) if __name__ == "__main__": for line in sys.stdin: process_input(line.strip("\r\n"))
Seems like cookies are disabled on this browser, please enable them to open this website
Camel Case 4
You are viewing a single comment's thread. Return to all comments →
I am able to solve this in python