R
R
Ruslan Mordovanech2021-11-23 15:19:58
Python
Ruslan Mordovanech, 2021-11-23 15:19:58

How can I change this for the bot so that it displays data?

corr = [
  {
    "date": "22.11.2021 09:00",
    "judge": " Коля І.І.",
    "forma": "Село",
    "number": "310/13063/19",
    "involved": "Колян Віктор Віталійович, відповідач: держави .",
  },
  {
    "date": "22.11.2021 09:30",
    "judge": " Птер В.М.",
    "forma": "Місто",
    "number": "303/995/20",
    "involved": "Особа: Панона В. С.",
    "description": "Вчинив правопорушення",
  },
  {
    "date": "22.11.2021 09:40",
    "judge": " Коля І.І.",
    "forma": "Дорога",
    "number": "303/1360/21",
    "involved": "Особа, яка притягається <code lang="python">
  }
]
</code>

<code lang="python">
for i in corr:
    if i['number'] == '303/1360/21':
        print(i['date'])
        print(i['judge'])
        print(i['forma'])
        print(i['number'])
        print(i['involved'])
        print(i['description'])
        break
</code>


Скажите где мне почитать ни как не могу понять как это сделать

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dmshar, 2021-11-23
@dmshar

Did the idea of ​​starting with learning Python ever cross your mind?
Well, at least from here: https://pythonworld.ru/bookshop/4.html
So we will continue to run to the forum for every error or every comma in the program?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question