Practice Arena

Python Coding Challenges

Write real Python in the browser. Instant feedback. From beginner to expert.

467 challenges 330 easy 120 medium 17 hard
Strings & Text easy

Kebab Case a Phrase

Implement a function that converts a phrase into lowercase kebab-case, handling spaces, punctuation, and camelCase.

strings case-conversion regex
+10 pts 15m
Strings & Text easy

Stack Trace Sanitizer

Implement a function that rewrites traceback file paths to basenames only.

strings regex parsing
+8 pts 12m
Strings & Text easy

Extract Hashtags

Extract unique hashtags from a given text string in the order they appear.

strings parsing hashtags
+10 pts 15m
Strings & Text easy

Extract mentions

Extract unique @mentions from a string, respecting email-like patterns and punctuation.

strings parsing sets
+10 pts 15m
Strings & Text easy

Remove HTML tags

Remove all HTML tags from a string to extract clean text.

html string parsing
+10 pts 15m
Strings & Text easy

Find all numbers in text

Write a function that extracts all standalone integers from a text string using regular expressions.

regex parsing numbers
+8 pts 12m
Regular Expressions easy

Validate phone number

Write a function that uses regular expressions to determine if a given string is a valid US phone number.

regex validation phone
+10 pts 15m
Regular Expressions easy

Match IPv4 Address

Write a function that uses a regular expression to check if a string is a valid IPv4 address.

regex validation ipv4
+8 pts 12m
Regular Expressions easy

Validate Hex Color Code

Write a function that validates hex color codes using regular expressions.

regex validation strings
+10 pts 10m
Regular Expressions easy

Multiline anchor match

Extract lines beginning with a plain-text prefix from multiline strings using Python's re module.

regex anchors multiline
+10 pts 15m
Regular Expressions easy

Lookahead Validation

Write a regex-based function to check if a password meets length and character class requirements.

regex lookahead validation
+8 pts 10m

Showing 11 challenges · easy

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

  1. Pick a category — basics, algorithms, strings, and more
  2. Open a challenge, read the statement, and edit the starter code
  3. 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.