python模块笔记
python的内置模块和做数学方面的一些模块的使用
真的不会追妹子
二五仔中的程序员
展开
-
random模块time模块
TIME模块&RANDOM模块 import time time.time() # 从1970年到现在,一共过了多少秒 # 一般这么用 t1 = time.time() # code running time to be count t2 = time.time() total = t2 - t1 time.strftime("%Y") # 2020 年 time.strftime("%y") # 有待查证,应该是年分后两位 time.strftime("%m") # 月份 time.strfti原创 2020-10-12 22:05:21 · 187 阅读 · 0 评论 -
python内置函数
反射相关内置函数2个 基础数据类型相关内置函数36个 面向对象内置函数9个 作用域相关内置函数2个 locals() # 返回本地作用域中的所有名字 print(locals()) # 结果{'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__spec__': None, '__annotations_原创 2020-10-01 17:08:06 · 196 阅读 · 0 评论