input: Write a python function to convert a query string into a dictionary.
  assert query_to_dict("country=usa&city=ny&lang=en&temp=77") == {'country': 'usa', 'city': 'ny', 'lang': 'en', 'temp': '77'}
  assert query_to_dict("name=John&age=30&gender=male") == {'name': 'John', 'age': '30', 'gender': 'male'}
  assert query_to_dict("key1=value1&key2=value2&key3=value3") == {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}
output: def query_to_dict(query):
      return dict(item.split('=') for item in query.split('&'))