Skip to content
Justice Tech School

Standard Library Tour

Python ships with math, random, datetime, os, sys, re, itertools and more. Import only what you need.

Example
import math, datetime, itertools
print(math.sqrt(16), math.pi)
print(datetime.date(2026, 3, 15).strftime("%d %b %Y"))
print(list(itertools.combinations("abc", 2)))

Result

4.0 3.141592653589793
15 Mar 2026
[('a', 'b'), ('a', 'c'), ('b', 'c')]

Exercise

Square root.

math.(16)

Quiz Test

What does import math give you?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.