Built-in Modules
Discover how to use Python’s built-in modules such as math, statistics, and os to perform calculations, manipulate data, and interact with operating system functions efficiently. Learn key functions for computations, statistical analysis, and system interaction to improve your Python coding skills.
We'll cover the following...
Introduction to modules
The standard Python distribution comes with about 300 modules; many more are available, both commercial and free. Before writing code to solve problems in a given domain, it is a good idea to first check to see what is already available.
This chapter will explore the built-in math, statistics, and os (operating system) packages.
Math module
The math module (import math) includes a lot of functions that are not available by default. Here are some of them:
-
ceil(x)...