Back

Given a string S consisting of 2 words reverse the order of two words . Input Size : |S| <= 10000000 Sample Testcase : INPUT hello world OUTPUT world hello

Created 1 year ago
244 Views
1 Comments
HariDM7SJz
@HariDM7SJz
HariDM7SJz
@HariDM7SJzProfile is locked. Login

Have a doubt in this program, please assist

s=input()

a=s[6:10+1:1]

b=s[0:4+1:1]

print(*a,*b)

Comments
Please login to comment.