Your question is Top Error IPs in Logs. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given a list of log lines logs, where each line is a string containing an IPv4 address and an HTTP status code separated by spaces, return the top 10 IP addresses that generated status code 500. The result should be ordered by descending count of 500 responses, and for ties, by ascending IP string.
def top_error_ips(logs):