We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 990e0cb commit 3def30bCopy full SHA for 3def30b
pygorithm/string/palindrome.py
@@ -0,0 +1,15 @@
1
+#Author: OMKAR PATHAK
2
+# Created On: 17th August 2017
3
+
4
+def is_palindrome(string):
5
+ '''This function checks the string for palindrome'''
6
+ revString = string[::-1]
7
+ if string == revString:
8
+ return True
9
+ else:
10
+ return False
11
12
+def get_code():
13
+ """ returns the code for the current class """
14
+ import inspect
15
+ return inspect.getsource(palindrome)
0 commit comments