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

Cycle a List Once

Implement a function that rotates a list right by one position.

lists rotation indexing
+5 pts 5m
Strings & Text easy

Is rotation of another string

Write a function to determine if one string is a rotation of another string.

strings rotation membership
+10 pts 15m
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
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

Rotate List Right by k

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

lists rotation modulo
+8 pts 10m
Bit Manipulation easy

Rotate Bits Left

Implement a function that rotates the bits of an integer to the left by a specified number of positions.

bit-manipulation integer rotation
+10 pts 15m
Binary Search medium

Find Minimum in Rotated Sorted Array

Implement a function that finds the minimum element in a rotated sorted array of distinct integers in O(log n) time.

binary-search arrays rotation
+25 pts 30m
Matrix & 2D Arrays easy

Rotate Image 90 Degrees Clockwise

Rotate a square matrix 90 degrees clockwise and return the rotated matrix.

matrix rotation in-place
+10 pts 15m
Matrix & 2D Arrays medium

Shift 2D Grid

Implement a function to shift a 2D grid right by k positions, flattening the grid and wrapping elements.

grid list modulo
+20 pts 20m
Matrix & 2D Arrays medium

Rotate Matrix Layers

Given a square matrix, rotate each concentric layer 90 degrees clockwise.

matrix rotation in-place
+25 pts 30m

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