Learn Python
Lesson 1 - Introduction To Python
Lesson 2 - Basic Python Syntax
Lesson 3 - Control Flow
Lesson 4 - Functions
Lesson 5 - Basic Data Structures
Lesson 6 - Exception Handling
Lesson 8 - Basic String Operations
Lesson 9 - Object-Oriented Programming (OOP)
Python's import
statement enables you to import necessary modules into your code.
import math
You can provide a custom name to the module during import. For example,
import math as mt
Don't need the entire module? Just import the specified function or variables as follows:
from math import pi print(pi)
Here, we import only the value of π
from the module math
.