定义一个函数 函数用关键字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