Home  >  Article  >  Backend Development  >  What are the keywords for importing other function libraries in python?

What are the keywords for importing other function libraries in python?

王林
王林Original
2020-06-09 09:44:138022browse

What are the keywords for importing other function libraries in python?

The keyword for importing other function libraries in python is import.

For example, if we need to import a module now, we can use the import statement to introduce the module. The syntax is as follows:

import module1[, module2[,... moduleN]]

For example, if we want to reference the module math, we can use it at the beginning of the file. Use import math to introduce. When calling functions in the math module, they must be quoted like this:

模块名.函数名

When the interpreter encounters an import statement, the module will be imported if it is in the current search path.

Recommended tutorial: python tutorial

The above is the detailed content of What are the keywords for importing other function libraries in python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn