python入口函數是【if name == “main”】,【print(name)】打印的是【main】,也就是說當一個模塊被當做一個整體調用的時候,模塊名【name】的值是【main】。
import time
def func():
print("666")
if __name__ == "__main__":
print("hello,world!")
func()
print(__name__)
print(time.__name__)
輸出
D:\PycharmProjects\test\venv\Scripts\python.exe D:/PycharmProjects/test/enter.py
hello,world!
666
__main__
time
Introduction to Python penetration testing: burpsuite generates passwords based on Web page content
Recently, I received a network
Ubuntu installation of python3.7 and the solution to the failure of soft link switching between python3 and PIP3
The terminal input has been so