input: Write a function to implement a linked list in Python using classes. The function should include a Node class to represent individual nodes in the linked list and a LinkedList class to represent the entire linked list. Additionally, provide methods within LinkedList to add and print nodes. The function should include test cases to demonstrate the addition and printing of nodes.
  assert linked_list().print_list() == None
  assert linked_list().add(1).add(2).add(3).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 add(self, data):
          new_node = Node(data)
          if self.head is None:
              self.head = new_node
          else:
              current = self.head
              while current.next:
                  current = current.next
              current.next = new_node
          return self
  
      def print_list(self):
          current = self.head
          while current:
              print(current.data, end=" ")
              current = current.next
          print()