import json
data = {}
while True:
name = input("Enter your name :\n")
age = input("Enter Your Age :\n")
co = input("Enter Your countery :\n")
rem = input("Contenu : \n [y or n]")
data["name"] = {"name":name,"age":age,"from":co}
s = json.dumps(data)
with open("data.json","a") as e:
e.write(s+"\n")
if rem.lower() == "y":
continue
elif rem.lower() == "n":
break
Simple code with json ✓
>>Click here to continue<<