Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Importing Standard Library | Python Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. Python Fundamentals

Lesson 22 of 55

·Python

Importing Standard Library

20 minutes

Course progress40%

What you'll learn

Keep these ideas in mind as you work through the lesson.

4 points
  • Standard library modules are available out‑of‑the‑box.
  • `import module` makes its contents accessible.
  • `from module import name` imports specific objects.
  • Common modules: `os`, `sys`, `math`, `datetime`, `json`, `re`.

Importing Standard Library

Python ships with a rich standard library that offers modules for OS interaction, mathematics, networking, and more—no extra installation required.

import os
import sys
import math

print('Current working directory:', os.getcwd())
print('Python version:', sys.version)
print('Square root of 16:', math.sqrt(16))

Explore the full library at https://docs.python.org/3/library/.

Make it stickPractice what you've learned1 quiz · 5 practical tests · Optional activities from Python FundamentalsBrowse activities
Previous lessonModules and PackagesContinue to lesson 23Working with JSONBack to Python Fundamentals curriculum