input: Write a function that creates a web server in Python using the Flask framework and serves a JSON object containing the current temperature for a city based on the city name given in the request.
  
  
  from flask import Flask, request
  import requests
  import json
  
  app = Flask(__name__)
  
  @app.route('/getTemp', methods=['POST'])
  def get_temp():
      city = request.json['city']
      url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
      r = requests.get(url.format(city))
      weather = json.loads(r.text)
      return {'temperature': weather['main']['temp']}
  
  if __name__ == '__main__':
      app.run(debug=True)
  
  assert get_temp({'city': 'London'})=={'temperature': X}  # Replace X with the expected temperature for London
  assert get_temp({'city': 'Paris'})=={'temperature': Y}    # Replace Y with the expected temperature for Paris
  assert get_temp({'city': 'New York'})=={'temperature': Z} # Replace Z with the expected temperature for New York
output: 
  def get_temp():
      city = request.json['city']
      url = 'http://api.openweathermap.org/data/2.5/weather?q={}&APPID=xxxxxx'
      r = requests.get(url.format(city))
      weather = json.loads(r.text)
      return {'temperature': weather['main']['temp']}
  