input: Write a function to implement a basic version control system in Python that keeps track of changes in the code. The class VersionControl should be initialized with a list of lines of code. It should have a method commit that records the current state of the lines of code, and a method restore that restores the code to the previous state. If there are no previous states to restore to, it should raise a ValueError.
  
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.mark = 0
   
      def commit(self):
          self.mark += 1
          log_file = open("log_file.txt", "a+")
          log_file.write(str(self.mark) + ": " + str(self.lines) + "\n")
          log_file.close()
   
      def restore(self):
          if self.mark <= 1:
              raise ValueError("No previous state to restore to")
          log_file = open("log_file.txt", "r")
          lines = log_file.readlines()
          to_mark = self.mark-1
   
          self.lines = eval(lines[to_mark].strip().split(": ", 1)[1])
          self.mark -= 1
          log_file.close()
  
  assert VersionControl(["print('Hello')"]).lines==["print('Hello')"]
  vcs = VersionControl(["print('Hello')"])
  vcs.commit()
  vcs.lines.append("print('World')")
  vcs.commit()
  vcs.restore()
  assert vcs.lines==["print('Hello')"]
  vcs.restore()
  assert vcs.lines==[]
  vcs = VersionControl([])
  vcs.commit()
  vcs.lines.append("print('Python')")
  vcs.commit()
  vcs.restore()
  assert vcs.lines==[]
output: 
  class VersionControl:
      def __init__(self, lines):
          self.lines = lines
          self.history = []
  
      def commit(self):
          self.history.append(self.lines[:])
  
      def restore(self):
          if len(self.history) <= 1:
              raise ValueError("No previous state to restore to")
          self.history.pop()
          self.lines = self.history[-1][:]
  