input: from typing import List
  
  
  def basic_version_control(lines: List[str]) -> VersionControl:
      """ Implement a basic version control system that keeps track of changes in the code.
      The input to the system is a list of lines of code. The system should allow for committing
      changes to a log file and restoring to a previous state.
      >>> version_control = basic_version_control(['print("Hello world!")', 'a = 10', 'b = 20'])
      >>> version_control.commit()
      >>> version_control.commit()
      >>> version_control.restore()
      """
      return VersionControl(lines)
output:     
  class VersionControl:
      def __init__(self, lines: List[str]):
          self.lines = lines
          self.history = []
  
      def commit(self):
          self.history.append(self.lines[:])
  
      def restore(self):
          if self.history:
              self.lines = self.history.pop()
  