Once you get through that terrifying factual and accepting that,then every place is the center of the universe,and every moment is the most important moment and everything is the meaning of life
摘要:
if name == 'main': Python解释器在导入模块时,会将模块中没有缩进的代码全部执行一遍(模块就是一个独立的Python文件)。 开发人员通常会在模块下方增加一些测试代码,为了避免这些测试代码在模块被导入后执行,可以利用__name__属性。 __name__属性 __name__ 阅读全文