Advertisement
Mario_Regine

palindroma

Nov 17th, 2019
559
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. def palindroma(s):
  2. #@param s:string
  3. #@return bool
  4.   cd=""
  5.   ci=""
  6.   i=0
  7.   f=len(s)-1
  8.   while(i!=(len(s))):
  9.     cd=cd+s[i]
  10.     ci=ci+s[f]
  11.     i=i+1
  12.     f=f-1
  13.   if(cd==ci):
  14.     return True
  15.   return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement