input: Write a function to create a linked list in Python using the given ListNode class. The function should take a list of integers as input and return the head of the linked list where each node contains consecutive integers from the input list. If the input list is empty, return None.
  
  assert list_to_linked_list([1, 2, 3, 4])==ListNode(1)
  assert list_to_linked_list([5, 6])==ListNode(5)
  assert list_to_linked_list([])==None
output: def list_to_linked_list(lst):
      if not lst:
          return None
      head = ListNode(lst[0])
      current = head
      for value in lst[1:]:
          current.next = ListNode(value)
          current = current.next
      return head