Last active
October 18, 2018 21:05
-
-
Save thomasjk10/990e27d14be6f5bff757cf59423c2b01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' 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