input: Write a function to create a basic REST API using Python and Flask that lists all the countries in the world.
  
  
  from flask import Flask, jsonify
  import json
  
  app = Flask(__name__)
  
  @app.route('/countries', methods=['GET'])
  def get_countries():
      with open('data.json', 'r') as f:
          countries = json.load(f)
      return jsonify(countries)
  
  if __name__ == '__main__':
      app.run()
  
  
  assert get_countries()['countries'][0]=='Afghanistan'
  assert get_countries()['countries'][1]=='Albania'
  assert get_countries()['countries'][2]=='Algeria'
  assert get_countries()['countries'][3]=='Andorra'
  assert get_countries()['countries'][-1]=='Zimbabwe'
  True
output: def get_countries():
      with open('data.json', 'r') as f:
          countries = json.load(f)
      return jsonify(countries)