Answer to Question #272808 in Python for Namashivaya

Question #272808

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

1
Expert's answer
2021-11-28T18:41:29-0500
s1 = input('Enter first string: ')
s2 = input('Enter second string: ')
if s1 == s2[::-1]:
	print('s2 is a rotation of string s1')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS