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

Take n Items

Given a list and a non-negative integer n, return a new list containing the first n elements.

slicing list basics
+8 pts 10m
Python Basics easy

Limit and Offset Query

Write a function that returns a page from a dataset given limit and offset.

pagination list slicing
+8 pts 10m
Strings & Text easy

Reverse a string

Return the characters of the string in reverse order.

strings slicing
+5 pts 5m
Strings & Text easy

Rotate String Right

Implement a function that rotates a given string to the right by a specified number of positions, handling shifts larger than the string length.

strings rotation slicing
+8 pts 10m
Strings & Text easy

Find substring index

Implement a function that returns the starting index of the first occurrence of a substring using only basic string indexing and slicing.

string search index
+10 pts 15m
Lists & Arrays easy

Chunk a list into n-sized parts

Write a function that divides a list into sublists of at most n elements.

list chunking slicing
+10 pts 15m
Lists & Arrays easy

Rotate Left by k

Implement a function that rotates a list left by k positions.

rotation lists slicing
+10 pts 15m
Lists & Arrays easy

Keep only even indexes

Given a list, return a new list containing only the elements at even indices (0, 2, 4, ...).

list slicing indexing
+5 pts 5m
Lists & Arrays easy

Chunk list into groups

Implement a function that splits a list into sublists of a given size.

list slicing chunking
+10 pts 10m
Lists & Arrays easy

Pad Array Edges

Write a function that pads a list with zeros on both ends.

lists slicing padding
+10 pts 10m
Lists & Arrays easy

Reorder list halves

Implement reorder_list(nums) that returns the first half followed by the reversed second half.

lists slicing reversal
+8 pts 10m
Lists & Arrays easy

Rotate List Right by k

Implement a function that rotates a list to the right by k positions.

lists rotation modulo
+8 pts 10m
Lists & Arrays easy

Pad array edges

Implement a function that pads a list on both ends with a given value to a specified total length.

lists padding slicing
+7 pts 10m
Data Structures & Algorithms easy

Memory view slice

Implement chunk_list that splits a list into consecutive sublists of a given chunk size.

slicing lists chunking
+10 pts 15m

Showing 1–14 of 14 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.