Asked: Anonymously |Category: Python
n = eval(input("Enter the no. of elements you want."))
l1 = list()
l2 = list()
for i in range(n):
l1.append(eval(input("Enter the element for first list:")))
l2=l1[::-1]
print(l2)
if(l2==l1):
print("Palindrome")
else:
print("Not Palindrome")
Comments