后浪云Python教程:python如何调用函数库
格式是: import<库名>
例如:
import turtle
如果需要用到函数库中函数,需要使用: <库名>.<函数名>
例如:
import turtle turtle.fd(100)
相关推荐:《Python基础教程》
python对函数库引用的第二种方式
格式是: from<库名>import<函数名>
from<库名>import *
调用函数不需要<库名>,直接使用<函数名>
例如:
from turtle import * fd(100)
版权声明:
作者:后浪云
链接:https://www.idc.net/help/169518/
文章版权归作者所有,未经允许请勿转载。
THE END