若想py程序好,模快必须不能少。
这几个模快,在Python中应该很常用。
第一个,os模快。
import os
就像我们平常用
os.system()来执行一些终端命令等。
有时候很方便
第二个,time模快。
这个模快与时间有关,可以用来做延迟等。
import time
time.sleep(1)
print("hello world")
第三个,requests模快。
这个模快一般用来做爬虫什么的。
不过要安装。
pip install requests
import requests
第4个。turtle模快。海龟画图。
import turtle
turtle.color('red')
turtle.forward(22)
第5个模快。pygame模快。
这个模快一般用来做小游戏什么的。
安装命令:
pip install pygame
import
``