diff --git a/Python/Program-3/README.md b/Python/Program-3/README.md new file mode 100644 index 00000000..67521f30 --- /dev/null +++ b/Python/Program-3/README.md @@ -0,0 +1,7 @@ +Program 3 + +Write a program to check whether the string is palindrome or not + +Variable description-- +a=Holds the input string +b=Holds the reverse of the string diff --git a/Python/Program-3/program.py b/Python/Program-3/program.py new file mode 100644 index 00000000..ac4daec0 --- /dev/null +++ b/Python/Program-3/program.py @@ -0,0 +1,8 @@ + + +a=input() +b=a[::-1] #String is reversed and stored in b +if (a==b): # If a and b both are equal string is Palindrome + print("String is Palindrome") +else: + print("String is not Palindrome")