【leetcode❤python】 234. Palindrome Linked List
#-*- coding: UTF-8 -*-
class Solution(object):
def isPalindrome(self, head):
"""
:type head: ListNode
:rtype: bool
"""
if head==None or head.next==None:return True
resList=[]
while head!=None:
resList.append(head.val)
head=head.next
return resList==resList[::-1]