you can use the json.dump() method to write the json dict directly to file instead of using the s. for example: with open('person.txt', 'w') as json_file: json.dump(person, json_file) here I replaced f with json_file (f works fine) and the person.txt file will be created if it does not already exist in the same dir of your python file > no need to type dir unless you want to move the file. Thank you for the video. I hope this helps.
I bought python course and him in this course can't learn json, he put code element and never translated how it's worked. But i watched you video and i learn it's to perfect. (I'm from Poland) =>