python_rag_system/lesson_9/home_task/task31.py
2025-10-18 19:17:31 +03:00

14 lines
463 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# todo: Извлеките IP-адреса всех запросов, которые завершились с ошибкой
# (коды ответа 4xx или 5xx).
log_entries = [
"192.168.1.1 - GET /home 200 1.2s",
"192.168.1.2 - POST /login 404 0.8s",
"192.168.1.3 - GET /profile 500 2.1s",
"192.168.1.4 - GET /about 200 0.5s",
"192.168.1.5 - POST /submit 403 1.5s"
]
#Результат:
['192.168.1.2', '192.168.1.3', '192.168.1.5']