会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
YD壹顿₀.₇
叶锦是我,寒枫也是我,叶锦喜欢文字,寒枫喜欢影像
博客园
首页
联系
订阅
管理
2023年3月16日
【python】if __name__ = '__main__' : 深入研究
摘要: # test1.py print (__name__) >> __main__ 想看懂这个,首先要清楚__name__是什么。 # test2.py import test1 >> test2 此时引用test1.py的print(__name__)得到test2,也就是test2.py的模块名,
阅读全文
posted @ 2023-03-16 12:27 好咯莫讲咯
阅读(19)
评论(0)
推荐(0)
公告