For this Question: Given a linked list consisting of N nodes, your task is to check if the given list is palindrome or not.

A palindrome is a string/number that mirrors itself, for example, 21312 reverse is also 21312.User task:
Since this will be a functional problem, you don't have to take input. You just have to complete the functions <b>Ispalindrome()</b> that takes the head of the linked list as parameter.

Constraints:-
1<=N<=1000
1<=Node.data<=1000Return true if given list is palindrome else return false.Sample Input 1:-
5
1 2 3 2 1

Sample Output 1:-
Yes

Sample Input 2:-
3
1 2 2

Sample Output 2:-
No, I have written this Solution Code: n=int(input())
l=input().split()
l=[int(i) for i in l]
if l[::-1]==l:
    print("Yes")
else:
    print("No"), In this Programming Language: Python, Now tell me if this Code is compilable or not?