input: Write a function to create a Python dictionary where the keys are the names from the given list and the values are their respective ages. The function should return the dictionary created.
  assert create_age_dict("John (20), Jane (40), Alex (18), Peter (45)")=={'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
  assert create_age_dict("Alice (30), Bob (25), Carol (22)")=={'Alice': 30, 'Bob': 25, 'Carol': 22}
  assert create_age_dict("")=={}
output: def create_age_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