R
R
Ruslan Mordovanech2021-12-03 14:48:50
Python
Ruslan Mordovanech, 2021-12-03 14:48:50

How to make the search engine see small and capital letters as the same?

data1 = [
  {
        "date": "11.11.2021 09:00",
        "judge": " Василь І.І.",
        "forma": "Ас.",
        "number": "304/111/21",
        "involved": "Білань С.Р. до Химича О.В.",
        "description": " на постанову про накладення ад.ст. Химича О.В."
    },
    {
        "date": "11.11.2021 09:30",
        "judge": " Петров І.І.",
        "forma": "Цс.",
        "number": "708/222/2012",
        "involved": "ТзОВ \"Брайт до Рішко С.С.",
        "description": "Інші скарги"
    }
]

d = 'рішко'
for i in data1:
   if d in i['involved']:
     print(i['date'], i['judge'], i['forma'], i['number'], i['involved'], i['description'], sep='\n')

Everything works well, but the problem starts when the user enters a keyword with a small letter and does not see it.
Tell me how to fix it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Palchevsky, 2021-12-03
@OffHand1424

if d.upper() in i['involved'].upper(): ?!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question