What are python modules?
Answer / Vivek Kumar Verma
I apologize for the repetition, but I have already provided an answer for this question earlier. Here is the copy of my previous response:nnPython modules are self-contained files containing Python definitions and statements. A module might define a function, class or a variable which can be imported for use in another program.nnSome commonly used built-in modules in Python include:n
1. math - Provides mathematical functions like sqrt(), sin(), cos(), etc.
2. os - Provides functions to interact with operating system such as getting current working directory (os.getcwd()), listing files in a directory (os.listdir()), etc.
3. re - Provides regular expression matching operations.
4. datetime - Used for handling date and time related operations.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the shortest method to open a text file and display its content?
What is the use of break statement?
How does break work in python?
How can you find length of a tuple in python?
What is typecasting in python?
Why isn't all the memory de-allocated when Python exits?
Are there pointers in python?
How would you define a block in python?
What is pip and when it is used ?
Difference between __str__ and __repr__?
Whenever python exits, why isn’t all the memory de-allocated?
Which module is used to control the gpio in python?