The following is my code:
import json id = "iderq23512345123521" with open("file.json", "r+") as f: data = json.loads(f.read()) f.truncate(0) del data[id] data = json.dumps(data) f.write(subs)
This is what the file looks like after I do it
When I try to copy and paste the characters, they don't show up
Rename the id variable to something else (like id2), id already is a python func
id
id2
2.1m questions
2.1m answers
60 comments
56.6k users