input: Write a function to create a dictionary from a given list of people with their names as keys and ages as values. The input will be a string containing names and ages in the format "Name (Age), Name (Age), ... Name (Age)".
  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 (25), Jack (30), Lily (15), Emma (22)")=={'Tom': 25, 'Jack': 30, 'Lily': 15, 'Emma': 22}
  assert create_people_dict("")=={}
  assert create_people_dict("Alice (19)")=={'Alice': 19}
  assert create_people_dict("Sam (33), Zoe (27), Bob (10)")=={'Sam': 33, 'Zoe': 27, 'Bob': 10}
output: def create_people_dict(s):
      if not s:
          return {}
      people = s.split(", ")
      result = {}
      for person in people:
          name, age = person.split(" (")
          age = int(age.rstrip(")"))
          result[name] = age
      return result