input: Write a function to convert a given list of people's names and ages into a dictionary where the names are keys and the ages are values.
  
  assert create_people_dict("John (20), Jane (40), Alex (18), Peter (45)")=={'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
  assert create_people_dict("Alice (30), Bob (25), Charlie (22)")=={'Alice': 30, 'Bob': 25, 'Charlie': 22}
  assert create_people_dict("")=={}
  assert create_people_dict("Sam (35)")=={'Sam': 35}
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