Skip to content

Instantly share code, notes, and snippets.

@thomasjk10
Last active October 18, 2018 21:05
Show Gist options
  • Save thomasjk10/990e27d14be6f5bff757cf59423c2b01 to your computer and use it in GitHub Desktop.
Save thomasjk10/990e27d14be6f5bff757cf59423c2b01 to your computer and use it in GitHub Desktop.
''' String compression'''
def is_substring(longstr, substr):
return longstr.find(substr)
def strrotation(s1, s2):
if len(s1) == len(s2) != 0:
return is_substring(s1 + s1, s2) != -1
return False
string1 = input()
string2 = input()
result = strrotation(string1,string2)
print (result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment