#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
import warnings
import locale
import json
import requests
warnings.filterwarnings("ignore")
locale.setlocale(locale.LC_ALL, '')
yandexkey = "dict.1.1.there_are_a_lot_of_numbers"
lang = "ru-en"
text = "бред"
uri = f"https://dictionary.yandex.net/api/v1/dicservice.json/lookup?key={yandexkey}&lang={lang}&text={text}"
outelem = len(json.loads(requests.post(uri).text))
r = requests.post(uri)
for x in range(0, outelem + 1):
print (eval(r.text)["def"][0]["tr"][x]["text"])
delirium
drivel
brad