input: Write a function to implement a linked list using classes in Python. The function should define a `Node` class to represent the nodes in the linked list and a `LinkedList` class to manage the entire list. The `LinkedList` class should include a method to print the list. The function should also include code to create a linked list with three nodes, link them, and print the list. If the function works correctly, the output should be the values of the nodes in the linked list, printed in order.
  
  
  assert LinkedList().print_list() == None
  
  
  assert [node.data for node in linked_list] == [1, 2, 3]
  
  
  assert linked_list.head.data == 1
  
  
  assert linked_list.head.next.data == 2
  
  
  assert linked_list.head.next.next.data == 3
  
output: class Node:
      def __init__(self, data):
          self.data = data
          self.next = None
  
  class LinkedList:
      def __init__(self):
          self.head = None
  
      def print_list(self):
          current = self.head
          while current:
              print(current.data, end=" ")
              current = current.next
  
  linked_list = LinkedList()
  node1 = Node(1)
  node2 = Node(2)
  node3 = Node(3)
  linked_list.head = node1
  node1.next = node2
  node2.next = node3