翻转
class Solution:
def reverse(self, head):
# write your code here
if head==None:
return head
new=None
while head!=None:
a=head.next
head.next=new
new=head
head=a
return new