import json
 
num = 5
res = [{'addr': 'hui', 'n': i }for i in range(num)]
jsnon = json.dumps(res, indent= 4, separators=(',', ': '))
print(jsnon)