zoukankan      html  css  js  c++  java
  • __name__和__main的含义

    if __name__ == "__main__":
        main()
    

     This module represents the (otherwise anonymous) scope in which the interpreter’s main program executes — commands read either from standard input, from a script file, or from an interactive prompt. It is this environment in which the idiomatic “conditional script” stanza causes a script to run:

    #此模块表示解释器的主程序执行的(否则为匿名)的范围,该命令读取标准输入,从脚本文件,或从交互式提示读取。正是这种环境,地道的“有条件的脚本”节使脚本运行:
    
    公众号请关注:侠之大者
  • 相关阅读:
    Kefa and Park
    分土地
    果园里的树
    分解质因数
    素数筛
    cantor的数表
    new一个二维数组
    基础练习 十六进制转八进制
    查函数功能
    concatenate函数
  • 原文地址:https://www.cnblogs.com/kamil/p/5152831.html
Copyright © 2011-2022 走看看