Handling Problems in Python

Solutions to problems faced by new Python-users

Friday, 18 October 2013

Shortest Code to Detect Rotated Strings in Python

a,b=raw_input().split()
print ['No','Yes'][a==(2*a).replace(b,"")]
Posted by Coding man at 06:13 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ▼  2013 (10)
    • ▼  October (8)
      • Write short codes in Python - Part 5
      • Why my python code is not working
      • Shortest Code to Detect Rotated Strings in Python
      • Shortest Magic Square Generator code in Python
      • Write short codes in Python - Part 4
      • Write short codes in Python - Part 3
      • Write short codes in Python - Part 2
      • Write short codes in Python - Part 1
    • ►  February (2)

About Me

Coding man
View my complete profile
Simple theme. Powered by Blogger.