Here is how I dump a file
with open(\'es_hosts.json\', \'w\') as fp: json.dump(\',\'.join(host_list.keys()), fp)
The results is
Just use for loop to assign list to string.
import json with open('json_file') as f: data = json.loads(f.read()) for value_wo_bracket in data['key_name']: print(value_wo_bracket)
Note there is difference between json.load and json.loads
json.load
json.loads