Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def is_rotation(s1,s2):
if s1==None :return False
if s1=='' and len(s2)!=0:return False
if s1=='' and s2=='':return True
if len(s1)!=len(s2):return False

return(len(s1) == len(s2) and s1 in s2*2)

print is_rotation('hello','lohel')
Binary file added build.pyc
Binary file not shown.
Binary file added tests/__init__.pyc
Binary file not shown.
Binary file added tests/test_is_rotation.pyc
Binary file not shown.