From 12835c6ba3b4aadd97f5361678e10eb4b23f5bed Mon Sep 17 00:00:00 2001 From: harshitha2204 <30696277+harshitha2204@users.noreply.github.com> Date: Sun, 18 Mar 2018 01:23:34 -0500 Subject: [PATCH] Create 7.palindrome.py --- 7.palindrome.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 7.palindrome.py diff --git a/7.palindrome.py b/7.palindrome.py new file mode 100644 index 0000000..ba9ae8b --- /dev/null +++ b/7.palindrome.py @@ -0,0 +1,6 @@ +str1=input("enter a string:") +str1_rev=str(str1[::-1]) +if(str1==str1_rev): + print("palindrome") +else: + print("not a palindrome")