Sponsored Reserved space — layout preview until AdSense is connected
Practice Arena

Python Coding Challenges

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

56 challenges 25 easy 23 medium 8 hard
Sponsored Reserved space — layout preview until AdSense is connected
Python Basics easy

FizzBuzz, precisely

Return a newline-separated string for 1..n: Fizz, Buzz, FizzBuzz, or the number.

control flow strings modulo
+10 pts 12m
Strings & Text easy

Reverse a string

Return the characters of the string in reverse order.

strings slicing
+5 pts 5m
Strings & Text easy

Palindrome check

Return True if the string reads the same forwards and backwards (ignoring case and non-alphanumeric).

strings two-pointer
+8 pts 8m
Strings & Text easy

Count vowels

Count the number of vowels (a, e, i, o, u) in a string (case-insensitive).

strings counting
+5 pts 5m
Strings & Text easy

Title case converter

Return the string with each word capitalised.

strings split
+5 pts 5m
Strings & Text easy

Anagram check

Return True if two strings are anagrams of each other.

strings sorting counter
+10 pts 10m
Strings & Text medium

Run-length encoding

Compress consecutive identical characters, e.g. 'aaabbc' → 'a3b2c1'.

strings compression
+20 pts 20m
Strings & Text medium

Longest common prefix

Find the longest common prefix among a list of strings.

strings zip
+18 pts 18m
Strings & Text medium

Integer to Roman

Convert a positive integer to its Roman numeral representation.

strings greedy
+22 pts 22m
Strings & Text medium

Zigzag string conversion

Encode a string in zigzag order across numRows rows, then read row by row.

strings math
+22 pts 20m
Dicts & Sets medium

Group anagrams

Group words that are anagrams of each other.

dict sorting strings
+22 pts 20m
Dicts & Sets easy

First non-repeating character

Find the index of the first character that appears only once.

dict strings counter
+12 pts 12m
Data Structures & Algorithms easy

Valid parentheses

Return True if brackets in the string close in the correct order.

stack strings
+15 pts 14m
Data Structures & Algorithms hard

Word ladder length

Return the length of the shortest transformation from beginWord to endWord changing one letter at a time.

BFS graph strings
+45 pts 40m

Showing 14 challenges