一、函数

定义函数: 

def fun_name(para_list):
    coding

def fun_name(para_list):
coding
return xxx

使用函数,fun_name(para)

局部变量,全局变量与C的相同,函数内部的局部变量,文件可见的,全局变量。

 二、模块

模块是函数的集合,先导入再使用,import time    time.asctime()   

三、包

包:包含有多个模块  from PIL import image从PIL包中导入image模块。           

相关文章:

  • 2022-01-08
  • 2021-07-24
  • 2022-12-23
  • 2021-05-22
  • 2021-11-06
  • 2022-02-26
  • 2021-09-25
猜你喜欢
  • 2021-12-06
  • 2021-11-24
  • 2021-11-01
  • 2022-12-23
  • 2021-08-01
  • 2021-06-24
  • 2021-05-09
相关资源
相似解决方案