Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def palindroma(s):
- #@param s:string
- #@return bool
- cd=""
- ci=""
- i=0
- f=len(s)-1
- while(i!=(len(s))):
- cd=cd+s[i]
- ci=ci+s[f]
- i=i+1
- f=f-1
- if(cd==ci):
- return True
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement