摘要:
c中的逻辑运算: && //与 || //或 ! //非 python中的逻辑运算: and #与 or #或 not #非 python的逻辑运算完全使用英语单词来表示,而不是和其他编程语言一样使用字符来表示。 python甚至还不需要用括号表示条件!!! if not a #如果a的值为fals 阅读全文
摘要:
python的变量不用定义类型,甚至不需要声明,个人感觉这方面像是在js的基础上再一次简化了。 python的代码块依靠缩进来标识 if a>10: print('hello') elif a>20: print('ohoh') 而其他语言的代码块需要有标识符来确定 if(a>10){ print( 阅读全文