MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / isPalindrome

Function isPalindrome

Python/5 recusrion problems.py:33–40  ·  view source on GitHub ↗
(strng)

Source from the content-addressed store, hash-verified

31# 3.. TO FIND IF THE GIVEN STRING IS PALINDROME OR NOT
32
33def isPalindrome(strng):
34 if len(strng)==0:
35 return True
36 if strng[0]==strng[-1]:
37 return isPalindrome(strng[1:-1])
38
39 else:
40 return False
41print((isPalindrome('naman')))
42
43

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected