input: Write a function to convert a linked list to a Python list.
  assert linkedlist_to_list(llist) == [1, 4, 3]
  llist.insertAtEnd(5)
  assert linkedlist_to_list(llist) == [1, 4, 3, 5]
  llist.deleteNode(4)
  assert linkedlist_to_list(llist) == [1, 3, 5]
output: def linkedlist_to_list(llist):
      result = []
      current = llist.head
      while current:
          result.append(current.data)
          current = current.next
      return result