diff --git a/palindrome string.py b/palindrome string.py new file mode 100644 index 0000000..4b0ea6f --- /dev/null +++ b/palindrome string.py @@ -0,0 +1,11 @@ +'''WAP to define a fn palin() that accept a string and check whether +it is palindrome''' +def palindrome(str): + P=str + Q=str[::-1] + if P==Q: + print('Palindrome string') + else: + print('Not a palindrome string') +str=input("Enter a string") +palindrome(str)