SyntaxFix
Write A Post
Hire A Developer
Questions
You can iterate through the key-value pair and write it into file
pair = {'name': name,'location': location} with open('F:\\twitter.json', 'a') as f: f.writelines('{}:{}'.format(k,v) for k, v in pair.items()) f.write('\n')