Tried a program -if json file already exists do nothing and if it does not exist then ask for input and write that input to file.Error is coming when I give input
import json
name="first.json"
try:
r=open(name)
except FileNotFoundError:
e=open(name,"w")
a=input("Enter Name: ")
json.dump(e,a)