Python import Statement - AskPythonhttps://www.askpython.com/python/python-import-statement插入module 里的函数
from {module} import {class/function}
from collections import OrderedDict from os import path from math import pi print(pi)想重新定义import的部分
import math as M print(M.pi)
想import 除了class和function以外的statement:
2. The import * StatementAll the methods and constants of a particular module can be imported using import * operator.
| from math(the_name_of_module) import * print(pi) print(floor(3.15)) |
如果不想import全部,那就
from module_name import A #如果想一次多个 from module_name import A,B #如果一次所有 from module_name import*Functions with inputs
Arguments&Paraments
def my_funtion(something):
#Do this with something
something=123
#something--parameter(参数)
#123--argument(函数调用时候的实际参数)



