From:http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.html

  1. numeric classes

Python has two main built-in numeric classes that implement the integer and floating point data types.Note that when two integers are divided, the result is a floating point.

  2. The boolean data type

>>> True
True
>>> False
False
>>> False or True
True
>>> not (False or True)
False
>>> True and True
True

In addition, relational operators and logical operators can be combined together to form complex logical questions.

Operation Name Operator Explanation
less than < < Less than operator
greater than > > Greater than operator
less than or equal <= <= Less than or equal to operator
greater than or equal >= >= Greater than or equal to operator
equal == == Equality operator
not equal != != Not equal operator
logical and and and Both operands True for result to be True
logical or or or One or the other operand is True for the result to be True
logical not not not Negates the truth value, False becomes True, True becomes False

  3. Identifiers

>>> theSum = 0
>>> theSum
0
>>> theSum = theSum + 1
>>> theSum
1
>>> theSum = True
>>> theSum
True
 
 

最新文章

  1. 自己写的基于bootstrap风格的弹框插件
  2. log4j配置说明
  3. 烂泥:linux文件同步之rsync学习(一)
  4. 手把手教你如何把java代码,打包成jar文件以及转换为exe可执行文件
  5. crossplatform---Nodejs in Visual Studio Code 10.IISNode
  6. sql临时表和表变量
  7. HDU1002 -A + B Problem II(大数a+b)
  8. Re-installation failed due to different application signatures./package name has exist
  9. PreResultListener使用
  10. 100% width CSS 在 iPad / iPhone Safari 背景被截断 / 显示不全
  11. POJ 1379 Run Away 【基础模拟退火】
  12. 使用js对form表单base64加密
  13. Python自动化--语言基础8--接口请求及封装
  14. pyinstaller使用-python项目转换成exe可执行文件
  15. CEYE平台的使用
  16. 重写COMBOXEDIT
  17. Vue+iview实现添加删除类
  18. PHP 随笔记
  19. C#并行编程(1):理解并行
  20. Excel 2016 Power View选项卡不显示的问题

热门文章

  1. Chrome中安装Firebug插件
  2. 洛谷P3245 大数 [HNOI2016] 莫队
  3. 批量删除以及将String数组转换成Integer数组的奇淫技巧
  4. (1.13)mysql优化数据库对象
  5. 如何将finecms链接URL中的list和show去掉
  6. css自动换行如何设置?url太长会撑开页面
  7. NYOJ 会场安排问题
  8. django中常用到的前端样式
  9. Kubernetes总结
  10. 【Java】-NO.14.Java.4.Java.1.001-【Java JUnit 5 】-