input: Write a function to implement a linked list in Python by creating a class for the nodes. The class should have an initialization method to set the data and next pointer.
  class ListNode:
      def __init__(self, data):
          self.data = data
          self.next = None
  assert ListNode(5).data==5
  assert ListNode(10).next==None
output: def __init__(self, data):
      self.data = data
      self.next = None