Work through focused Python exercises from approachable foundations to more demanding problem-solving patterns.
Start with one core idea at a time and make the basic moves feel automatic.
Return a dictionary of lower-case word counts for a sentence, ignoring repeated whitespace and simple punctuation at word edges.
Return the repeated values from a list while preserving their first repeated order.
Return a normalized email address by trimming surrounding whitespace and lower-casing its local and domain parts. Reject strings without exactly one @ and non-string input with None.
Combine concepts, validate inputs, and make practical design decisions.
Merge user settings over defaults, but accept only known keys and return a new dictionary. Unknown user keys must be ignored.
Determine whether every opening bracket in the input closes in the correct order.
Work with edge cases, maintainability, and the tradeoffs found in production code.
Call an operation up to attempts times and return a result dictionary containing ok, value or error, and attempts_used. Do not retry KeyboardInterrupt or SystemExit.
Design summarize_file so it reads UTF-8 text, returns line and word counts, and gives the caller a useful error result for a missing or undecodable file instead of crashing.
Return to the free lessons, editable examples, and quick checks whenever an exercise exposes a gap.
Return only records with a non-empty name and a non-negative integer score. Do not modify the original dictionaries.