Print Args Decorator
Write a decorator that prints function name and arguments, then returns the original result.
Count calls decorator
Implement a decorator that counts and reports how many times the wrapped function is called.
Log Calls Decorator
Create a decorator that prints call details and returns the original result.
Benchmark decorator
Implement a benchmarking decorator that records call count and timing statistics per function.
Safe divide function
Implement safe_divide that returns None on ZeroDivisionError and TypeError.
Safe Float Parser
Write a function that safely converts a string to a float, returning None for invalid inputs.
Divide with zero check
Write a function that safely divides two numbers, catching division by zero.
Key error handler
Implement a safe dictionary access function that returns a default value on missing keys.
Else on try block
Implement a function that uses try-except-else to safely divide two numbers and return a result or error description.
Exit handler registration
Write a function that registers a callback to run at interpreter exit and returns True on success.
Validate Email Regex
Implement a function that validates email addresses using regex with specific rules.
Validate phone number
Write a function that uses regular expressions to determine if a given string is a valid US phone number.
Match IPv4 Address
Write a function that uses a regular expression to check if a string is a valid IPv4 address.
Match IPv6 Address
Write a function that uses a regex to validate whether a string is a fully expanded IPv6 address.
Match Credit Card Pattern
Write a function that validates a credit card number string against a set of formatting rules.
Validate Hex Color Code
Write a function that validates hex color codes using regular expressions.
Lookahead Validation
Write a regex-based function to check if a password meets length and character class requirements.
Match Balanced Parentheses with Regex
Write a function that uses regular expressions to determine if parentheses are balanced and properly nested.
Match scientific notation
Implement a function that checks if a string is in valid scientific notation.
Non-greedy quantifier
Implement a function that uses a non-greedy regex to extract the shortest substring between two delimiters.
Nth Triangular Number
Implement a function that returns the nth triangular number efficiently.
Integer Square Root Floor
Implement a function that returns the greatest integer whose square is ≤ n, using only integer operations.
Catalan number
Implement a function that returns the nth Catalan number using dynamic programming.
Stirling number
Implement a function to compute Stirling numbers of the second kind S(n,k).
Showing 217–240 of 365 challenges
Guide: free Python coding challenges
Practice Python by solving problems
PythonSkillset challenges are hands-on coding exercises from beginner to advanced. Open a challenge, read the problem, write Python in the split-pane editor, and run tests with Pyodide — no install required.
How to use the arena
- Pick a category — basics, algorithms, strings, and more
- Open a challenge, read the statement, and edit the starter code
- Run tests, fix failures, then try a related quiz or tutorial lesson
Challenges vs tutorials and quizzes
Challenges test what you can build under constraints. For guided teaching, use our Python tutorials. For quick checks, try quizzes or copy snippets from code samples.