input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The function should be implemented as a class called VersionControl with methods to initialize the system, commit changes, and restore to a previous version.
  assert VersionControl(['print("Hello, World!")']).lines==['print("Hello, World!")']
  assert VersionControl(['print("Hello, World!")']).commit()==True
  assert VersionControl(['print("Hello, World!")']).restore()==True
output: class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.history = [lines.copy()]
  
      def commit(self):
          self.history.append(self.lines.copy())
          return True
  
      def restore(self):
          if len(self.history) > 1:
              self.lines = self.history[-2].copy()
              self.history.pop()
              return True
          return False