input: Write a function to implement a linked list using classes in Python. Create a class Node to represent a node in the linked list and a class LinkedList to represent the entire linked list. Implement a method to print the linked list.
  assert Node(1).data==1
  assert Node(2).next==None
  linked_list = LinkedList()
  node1 = Node(1)
  node2 = Node(2)
  linked_list.head = node1
  node1.next = node2
  assert linked_list.head.data==1
  assert linked_list.head.next.data==2
  assert node2.next==None
  linked_list.print_list() # This will print: 1 followed by 2
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