There are such dictionaries obtained by the cycle:
{'first_name': 'Иван', 'last_name': 'Иванов', 'online': 0} {'first_name': 'Иван', 'last_name': 'Иванов', 'online': 1} {'first_name': 'Иван', 'last_name': 'Иванов', 'online': 0} {'first_name': 'Иван', 'last_name': 'Иванов', 'online': 1} You need to get dictionaries that have 'online' with a value of 1. At the same time, so that whole dictionaries are returned, i.e. with first_name and last_name, and not just 'online': 1. I tried to do this:
for search in dict: if 'online' == 1 in search: print(search) But the result did not give any.