79257166

Date: 2024-12-06 07:33:01
Score: 3.5
Natty:
Report link

What happens when you use only one "with open" with 'w+' ?

with open(r"\\path\to\file\datafile.txt", 'w+') as file:
    data = json.load(file)
    data.append(new_vars)
    json.dump(data, file)
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Starts with a question (0.5): What
  • Low reputation (1):
Posted by: solari