input: from typing import List
  
  
  def VersionControl(lines: List[str]) -> None:
      """Implement a basic version control system in Python that keeps track of changes in the code.
      The function should log changes made to the given lines of code and allow restoration to a previous state.
      >>> vcs = VersionControl(["print('Hello, world')", "def add(a, b): return a + b"])
      >>> vcs.commit()
      >>> vcs.lines = ["print('Hello, world')", "def subtract(a, b): return a - b"]
      >>> vcs.commit()
      >>> vcs.restore()
      >>> vcs.lines
      ["print('Hello, world')", "def add(a, b): return a + b"]
      """
output:     
      class VersionControl:
          def __init__(self, lines: List[str]):
              self.lines = lines
              self.history = []
  
          def commit(self) -> None:
              self.history.append(self.lines[:])
  
          def restore(self) -> None:
              if self.history:
                  self.lines = self.history.pop()
  