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
Dicts & Sets easy

Anagram Dictionary Groups Lite

Group a list of words into anagrams using a dictionary keyed by sorted characters.

dicts strings anagrams
+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
Dynamic Programming medium

Edit Distance (Levenshtein Distance)

Implement the classic edit distance algorithm to find the minimum number of single-character edits required to transform one string into another.

dynamic-programming strings levenshtein-distance
+25 pts 30m
Graphs & Graph Algorithms medium

Minimum Genetic Mutation

Implement a function to compute the minimum number of single-character mutations needed to transform one gene string into another, using a given bank of valid mutations.

bfs graph string
+30 pts 30m
Greedy Algorithms medium

Partition Labels

Partition a string into maximal parts where each character appears in only one part, returning part lengths.

greedy string hashmap
+20 pts 20m
Two Pointers & Sliding Window easy

Longest Substring Without Repeating Characters

Implement a function that returns the length of the longest substring without repeating characters.

strings sliding-window two-pointers
+10 pts 15m
Two Pointers & Sliding Window hard

Minimum Window Substring

Implement a sliding window algorithm to find the minimum window substring containing all characters of a given pattern.

sliding-window two-pointers strings
+45 pts 35m
Two Pointers & Sliding Window medium

Character Replacement Window

Given a string and a number k, find the length of the longest substring that can be made uniform by replacing at most k characters.

sliding-window two-pointers strings
+30 pts 25m
Two Pointers & Sliding Window medium

Longest Substring with At Most K Distinct Characters

Given a string and an integer k, find the length of the longest substring that contains at most k distinct characters.

sliding-window strings hash-map
+25 pts 20m
Two Pointers & Sliding Window medium

Longest Repeating Character Replacement

Given a string and an integer k, return the length of the longest substring that can be made of identical characters after at most k replacements.

sliding-window strings hash-map
+30 pts 25m
Data Formats & Parsing medium

Base64 Encode Decode

Implement Base64 encoding and decoding functions that handle padding and all standard characters.

base64 encoding decoding
+20 pts 30m
Cryptography & Hashing easy

Compute SHA-1 Hash String

Write a function that returns the SHA-1 hash of a string as a 40-character hex string.

sha1 hashlib hashing
+10 pts 15m
Cryptography & Hashing easy

XOR Cipher Encode

Implement the XOR cipher: encode a string by XORing each character with a key character.

xor encryption strings
+10 pts 10m

Showing 25–37 of 37 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

  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.