Question #272808

Write a program to determine if a string S2 is a rotation of anothe string

Expert's answer

s1 = input('Enter first string: ')
s2 = input('Enter second string: ')
if s1 == s2[::-1]:
	print('s2 is a rotation of string s1')
LATEST TUTORIALS
APPROVED BY CLIENTS