input: Write a function to implement a linked list using classes in Python. Your function should include a Node class to represent individual nodes in the list and a LinkedList class to manage the overall list. Additionally, provide a method to print the elements of the linked list. The function should include examples of creating a linked list and printing its elements.
  assert Node(1).data == 1
  assert Node(2).data == 2
  assert LinkedList().print_list() == None
  assert linked_list.print_list() == None
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