input: Write a function to create a Python dictionary from a list of names and their corresponding ages. Each name should be a key in the dictionary, and the age should be its corresponding value.
  assert create_people_dict("John (20), Jane (40), Alex (18), Peter (45)")=={'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
  assert create_people_dict("Tom (15), Jerry (25), Lisa (30)")=={'Tom': 15, 'Jerry': 25, 'Lisa': 30}
  assert create_people_dict("")=={}
  assert create_people_dict("Alice (33), Bob (50)")=={'Alice': 33, 'Bob': 50}
  assert create_people_dict("Mary (22)")=={'Mary': 22}
output: def create_people_dict(s):
      if not s:
          return {}
      pairs = s.split(", ")
      result = {}
      for pair in pairs:
          name, age = pair.split(" (")
          age = int(age.rstrip(")"))
          result[name] = age
      return result