input: Write a function to implement a linked list using classes in Python. The function should include two classes: Node and LinkedList. The Node class should have an initializer to set the data and next attributes. The LinkedList class should have an initializer to set the head attribute and a method to print the list. The function should also include code to create a linked list and print its elements.
  assert linked_list().head.data == 1
  assert linked_list().head.next.data == 2
  assert linked_list().head.next.next.data == 3
  assert linked_list().print_list() == None
output: class Node:
      def __init__(self, data=None):
          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
  
  def linked_list():
      ll = LinkedList()
      ll.head = Node(1)
      second = Node(2)
      third = Node(3)
      ll.head.next = second
      second.next = third
      return ll