input: Write a function to implement a linked list using classes in Python. The function should include classes for Node and LinkedList. The LinkedList class should have methods to initialize the list and print its contents. Additionally, provide examples of creating nodes and a linked list, linking the nodes, and printing the linked list.
  assert LinkedList().print_list() is None
  assert LinkedList().head is None
  assert Node(1).data == 1
  assert Node(2).next is None
  linked_list = LinkedList()
  node1 = Node(1)
  node2 = Node(2)
  node3 = Node(3)
  linked_list.head = node1
  node1.next = node2
  node2.next = node3
  linked_list.print_list()  # Should print: 1 2 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