string reverse in python,print(''.join(x[::-1] for x in pattern.split(string)))