Sunday, October 13, 2019

Dimik oj - 16 - শব্দ বিপর্যয় python3 solution

    test = int(input())
    for i in range(test):
        sentence = input().split(' ')
        res = []
        for x in sentence:
            word = "".join(reversed(x)) 
            res.append(word)  #res.append(x[::-1])
        print(' '.join(res))

No comments: