# D. Scott # CCI - Problem 1.9 # Determine whether a string is a particular rotation of another string s1 = input("Enter a string: ") s2 = input("Enter another string: ") # Concatenate s1 to itself s3 = [] for i in range (0,2): for c in s1: s3.append(c) s3_joined = "".join(s3) if (s2 in s3_joined): print(s2, " is a rotation of ",s1) else: print(s2, " is not a rotation of ",s1) # D. Scott # CCI - Problem 1.9 # Determine whether a string is a particular rotation of another string s1 = input("Enter a string: ") s2 = input("Enter another string: ") # Concatenate s1 to itself s3 = [] for i in range (0,2): for c in s1: s3.append(c) s3_joined = "".join(s3) if (s2 in s3_joined): print(s2, " is a rotation of ",s1) else: print(s2, " is not a rotation of ",s1)