Sandbox
A free playground for Python and ML code. No challenge, no grading โ just run, tweak, and save your experiments.
Pair-program in real time
Host or join a shared edit room with a peer or live tutor.
Run your code to see output here.Click Run โ after each run, you'll get instant AI feedback on style, optimizations, and any errors.
Available Python libraries
Pre-installed in the in-browser runtime โ just import them.
import mathBasic mathematical functions (sqrt, sin, log, etc.).
import statisticsMean, median, stdev, variance and friends.
import randomPseudo-random number generation and sampling.
import itertoolsEfficient looping building blocks (combinations, permutations, chain).
import functoolsHigher-order utilities like reduce, lru_cache, partial.
import collectionsCounter, defaultdict, deque, namedtuple.
import datetimeDates, times, deltas and formatting.
import jsonParse and serialize JSON.
import reRegular expressions.
import stringString constants and helpers.
import typingType hints (List, Dict, Optional, etc.).
import dataclassesDecorator-based data classes.
import heapqPriority queue / min-heap algorithms.
import bisectArray bisection algorithms (sorted-list insertion).
import ioIn-memory streams (StringIO, BytesIO).
import numpyN-dimensional arrays, vectorized math, linear algebra.
import scipyScientific algorithms: optimize, stats, signal, linalg.
import sympySymbolic math: algebra, calculus, equation solving.
import pandasDataFrames, CSV/Excel I/O, group-by, time series.
import sklearnClassical ML: regression, classification, clustering, preprocessing.
import matplotlibPlotting and charts. Use matplotlib.pyplot.
import urllibURL handling utilities (parsing, requests in stdlib).
import requestsHTTP requests (subject to browser CORS in sandbox).
import pprintPretty-print Python data structures.
import textwrapText wrapping and indenting.
import decimalFixed and floating point arithmetic with arbitrary precision.
import fractionsRational number arithmetic.