import json

cities = [

	{'rank' : 1, 'city': '上海', 'population': 24150000},
	{'rank' : 2, 'city': 'カラチ', 'population': 23500000},
	{'rank' : 3, 'city': '北京', 'population': 21516000},
	{'rank' : 4, 'city': '天津', 'population': 14722100},
	{'rank' : 5, 'city': 'イスタンブル', 'population': 1460467},
	
	
]
with open('top_cities.json', 'w') as f:
	json.dump(cities, f, ensure_ascii=False, indent=2)
#print(json.dumps(cities, ensure_ascii=False, indent=2))

27c2b37831f2a4c4da02bd2100149e5abd727861
<mask token>

<mask token>
with open('top_cities.json', 'w') as f:
    json.dump(cities, f, ensure_ascii=False, indent=2)

<mask token>
cities = [{'rank': 1, 'city': '上海', 'population': 24150000}, {'rank': 2,
    'city': 'カラチ', 'population': 23500000}, {'rank': 3, 'city': '北京',
    'population': 21516000}, {'rank': 4, 'city': '天津', 'population': 
    14722100}, {'rank': 5, 'city': 'イスタンブル', 'population': 1460467}]
with open('top_cities.json', 'w') as f:
    json.dump(cities, f, ensure_ascii=False, indent=2)

import json
cities = [{'rank': 1, 'city': '上海', 'population': 24150000}, {'rank': 2,
    'city': 'カラチ', 'population': 23500000}, {'rank': 3, 'city': '北京',
    'population': 21516000}, {'rank': 4, 'city': '天津', 'population': 
    14722100}, {'rank': 5, 'city': 'イスタンブル', 'population': 1460467}]
with open('top_cities.json', 'w') as f:
    json.dump(cities, f, ensure_ascii=False, indent=2)

import json

cities = [

	{'rank' : 1, 'city': '上海', 'population': 24150000},
	{'rank' : 2, 'city': 'カラチ', 'population': 23500000},
	{'rank' : 3, 'city': '北京', 'population': 21516000},
	{'rank' : 4, 'city': '天津', 'population': 14722100},
	{'rank' : 5, 'city': 'イスタンブル', 'population': 1460467},
	
	
]
with open('top_cities.json', 'w') as f:
	json.dump(cities, f, ensure_ascii=False, indent=2)
#print(json.dumps(cities, ensure_ascii=False, indent=2))
