text = "string"
number = 1
documents = {'documents' : [
{'id': number, 'text': text },
]}
Я хочу использовать оператор цикла, чтобы назначить больше переменных (число, текст) в тексте формата Json для создания большего количества строк, например:
{'id': '2', 'text': 'I had a terrible time at the hotel. The staff was rude and the food was awful.'},
{'id': '3','text': 'Los caminos que llevan hasta Monte Rainier son espectaculares y hermosos.'},
{'id': '4', 'text': 'La carretera estaba atascada. Había mucho tráfico el día de ayer.'}