input: from typing import List, Dict
  
  def create_age_dictionary(names_ages: List[str]) -> Dict[str, int]:
      """ Convert a list of name-age pairs into a dictionary where names are keys and ages are values.
      >>> create_age_dictionary(['John (20)', 'Jane (40)', 'Alex (18)', 'Peter (45)'])
      {'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
      """
      
      people_dict = {}
      for pair in names_ages:
          name, age = pair.rstrip(')').split(' (')
          people_dict[name] = int(age)
      return people_dict
output:     people_dict = {}
      for pair in names_ages:
          name, age = pair.rstrip(')').split(' (')
          people_dict[name] = int(age)
      return people_dict