15 lines
333 B
Python
15 lines
333 B
Python
import json
|
|
|
|
# Fill my Json File with object from 0 to 299
|
|
counter = 0
|
|
data = [{counter: {'question': '', 'answer': ''}}]
|
|
|
|
while counter < 300:
|
|
data.append({counter: {'question': '', 'answer': ''}})
|
|
counter += 1
|
|
print(data)
|
|
|
|
json_string = json.dumps(data)
|
|
with open('jsontest.json', 'w') as file:
|
|
file.write(json_string)
|