Your question is Python Text Line Counter. 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.
An Okta System Log export is represented as a list of text lines. Given the lines and a target word, return how many lines contain that word as a contiguous substring, ignoring letter case.
A line is counted at most once, even if the target appears multiple times. Punctuation does not prevent a match, so "MFA denied." contains "mfa".
Implement count_matching_lines(lines, word):
lines, a list of strings, and word, a non-empty string.word occurs as a case-insensitive substring.def count_matching_lines(lines, word):