Write a Python program to create a new JSON file from an existing JSON file
- برمجة
- برمجة بايثون
- 2021-04-15
- salsabeelalhams99111801528
الأجوبة
import json
with open('states.json') as f:
state_data= json.load(f)
for state in state_data['states']:
del state['area_codes']
with open('new_states.json', 'w') as f:
json.dump(state_data, f, indent=2)أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال