Advertisement

Python Modules, Dates & Math

Previous Lesson 230 of 233 Next
Advertisement
Lesson Overview: Organize multi-file apps with import and leverage datetime, math, and random.

Batteries Included

Python ships hundreds of built-in modules ready to import without installing external packages.

  • import math, datetime, random
  • from pathlib import Path for cross-platform paths

Using math & datetime (Editable — type & Run)

Advertisement

Test Yourself With Exercises

Import only the sqrt function from the math module:

math import sqrt
Advertisement