定义一个函数 函数用关键字 def 来定义。def 关键字后跟一个函数的标识符名称,然后跟一对圆括号。圆括号之中可以包括一些变量名,该行以冒号结尾。接下来是一块语句,它们是函数体。 def sayHello(): print('Hello World!') #调用 s...
Continue readingif 语句 if condition: ... elif condition: ... else: ... while 语句 while condition: ... else: ... for 循环 for i in range (...
Continue reading数字 在 Python 中数的类型有三种——整数、浮点数和复数。 2 是一个整数的例子。 3.23 和 52.3E-4 是浮点数的例子。E 标记表示 10 的幂。在这里, 52.3E-4 表示 52.3 * 10−4。 (-5+4j) 和 (2.3-4.6j) 是复数的例...
Continue readingAuthentication with old (insecure) passwords is not supported. For more information, lookup Password Hashing in the latest MySQL manual ...
Continue readingpydev 插件的官方网站: http://www.pydev.org 启动 Eclipse, 点击 Help->Install New Software, 在弹出的对话框中,点 Add 按钮. Name 中填: Pydev,Location 中填 http://pydev.org/...
Continue readingPython 中执行 import this 时, 会显 Tim Peters 写的一段话: The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit...
Continue reading