input: Write a function to create a Python dictionary with the names as keys and the ages as values from the given string. The input string will have names followed by their ages in parentheses. If the input string is empty, return an empty dictionary.
  assert create_dict_from_people('John (20), Jane (40), Alex (18), Peter (45)')=={'John': 20, 'Jane': 40, 'Alex': 18, 'Peter': 45}
  assert create_dict_from_people('')=={}
output: def create_dict_from_people(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