#try to avoid input function a = [1,2,3,4,3,2,1] b = [] for i in range(len(a)-1,-1,-1): b.append(a[i]) if a == b: print("Palindrome") else: print("Not a Palindrome")
Click the run button. Try to avoid input() function.