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
Python Basics easy

Max of a variable-length list

Implement a function that returns the maximum value from a list of numbers without using max().

conditionals loops comparison
+10 pts 10m
Python Basics easy

Max of three numbers

Implement a function that returns the maximum of three numbers using comparisons.

conditionals comparison numbers
+10 pts 10m
Python Basics easy

Range of values

Calculate the range (max minus min) of a list of numbers. Empty list returns 0.

min max numbers
+10 pts 10m
Strings & Text easy

Longest Word Finder

Write a function that extracts alphabetic words from a string and returns the longest one, with ties broken by earliest position.

strings parsing max
+10 pts 10m
Lists & Arrays easy

Running Maximum

Implement a function that returns a list where each element is the largest value seen so far.

lists cumulative maximum
+10 pts 15m
Lists & Arrays easy

Average excluding min and max

Return the average of a list after discarding the lowest and highest elements, handling edge cases.

lists statistics sorting
+7 pts 10m
Lists & Arrays easy

Find Second Largest

Find the second largest unique number in a list, or None if it doesn't exist.

sorting max unique
+10 pts 10m
Dynamic Programming easy

House Robber

Given a list of house values, return the maximum sum you can rob without robbing two adjacent houses.

dynamic-programming arrays optimization
+10 pts 15m
Trees & Binary Trees easy

Maximum depth of tree

Implement max_depth(root) to return the maximum depth of a binary tree.

binary-tree recursion depth
+10 pts 15m
Greedy Algorithms easy

Stock Buy Sell Once

Given daily stock prices, compute the maximum profit you can achieve from buying once and selling once later.

array profit max
+10 pts 15m
Two Pointers & Sliding Window easy

Best Time to Buy and Sell Stock

Given a list of daily stock prices, determine the maximum profit achievable by buying on one day and selling on a later day.

arrays sliding-window profit
+10 pts 15m

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.