Practice Arena

Python Coding Challenges

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

925 challenges 556 easy 323 medium 46 hard
Strings & Text easy

Parse URL components

Write parse_url that splits a URL into its standard components with defaults for missing parts.

url-parsing strings parsing
+8 pts 10m
Strings & Text easy

Parse HTTP Status Line

Write a function that parses a well-formed HTTP status line into its three components.

strings parsing http
+8 pts 15m
Strings & Text easy

Parse markdown headers

Write a function that parses markdown headers and returns their levels and texts.

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

Parse bullet list

Parse a markdown-style bullet list and return the list of item texts, stripping bullet markers and trimming surrounding whitespace.

parsing strings markdown
+8 pts 10m
Strings & Text easy

Parse numbered list

Take a string containing a numbered list and return a clean list of the item texts.

string parsing strip split
+8 pts 12m
Strings & Text easy

Parse Version SemVer

Write a function that parses a semantic version string into its numeric components.

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

Compare Version Strings

Given two version strings, compare them numerically by splitting on dots and ignoring leading zeros.

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

Parse path segments

Implement a function that parses a path string into clean segments, ignoring slashes, empty parts, and dot segments.

strings parsing split
+10 pts 10m
Strings & Text easy

Parse coordinate pairs

Parse a string of coordinate pairs into a list of coordinate lists.

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

Parse range notation

Parse a comma-separated list of ranges and individual numbers, expanding each range into its full sequence.

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

Parse Boolean Strings

Implement a function that parses a boolean string into a Python bool, handling True/False/Yes/No/1/0 case-insensitively.

strings boolean parsing
+10 pts 10m
Strings & Text easy

Find repeated words

Return a lowercase list of unique words that appear more than once across a given text, ignoring case.

string parsing word-count
+8 pts 12m
Strings & Text easy

Crawler Log Folder

Given a list of folder navigation operations, compute the minimum steps required to return to the main folder.

strings stack simulation
+10 pts 15m
Strings & Text easy

Parse Hex Dump

Write a function that parses a hex dump string into a list of integers.

hex parsing bytes
+8 pts 12m
Dicts & Sets easy

Nested get with dotted path

Implement a function that safely retrieves a value from a deeply nested dictionary using a dot-separated path, returning a default if any key is missing.

dicts nested parsing
+8 pts 10m
Error Handling & Exceptions easy

Safe Integer from String

Implement safe_int that converts a string to an integer, returning a default value on any failure, with support for an optional base.

exceptions parsing default-value
+10 pts 15m
Error Handling & Exceptions easy

Safe int parser

Implement safe_parse_int that converts a string to an int, returning a default value on failure.

exceptions parsing validation
+10 pts 10m
Error Handling & Exceptions easy

Safe Float Parser

Write a function that safely converts a string to a float, returning None for invalid inputs.

float exception parsing
+10 pts 10m
Error Handling & Exceptions easy

Parse Error Recovery

Parse a whitespace-separated string into a list of valid integers, skipping invalid tokens.

parsing exceptions error-handling
+10 pts 15m
Regular Expressions easy

Non-greedy quantifier

Implement a function that uses a non-greedy regex to extract the shortest substring between two delimiters.

regex lazy quantifier string parsing
+8 pts 10m
Regular Expressions easy

Named group extraction

Parse a log line into structured fields using named groups and re.match.

regex named-groups parsing
+8 pts 12m
Stacks & Queues easy

Balanced brackets in string

Check if a string of brackets is properly balanced using a stack-based approach.

stack string parsing
+10 pts 15m
Datetime & Time Calculations easy

Format date output

Parse ISO date strings and format them into a friendly US-style date output.

datetime string-formatting date-parsing
+8 pts 10m
Datetime & Time Calculations easy

Datetime to Unix timestamp

Parse a datetime string and convert it to a Unix timestamp assuming UTC.

datetime parsing timestamp
+8 pts 10m

Showing 25–48 of 58 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.