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
 
 

Python - 1. Built-in Atomic Data Types的更多相关文章

  1. Python - 2. Built-in Collection Data Types

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

  2. Data Types

    原地址: Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / Database Administ ...

  3. Primitive Data Types

    Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics) http ...

  4. C and SQL data types for ODBC and CLI

    C and SQL data types for ODBC and CLI   This topic lists the C and SQL data types for ODBC and CLI a ...

  5. allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[System.DateTime]

    allow zero datetime=true导致datetime转换失败:MySql.Data.Types.MySqlDateTime”的对象无法转换为类型“System.Nullable`1[S ...

  6. "SQL Server does not handle comparison of NText, Text, Xml, or Image data types."

    "SQL Server does not handle comparison of NText, Text, Xml, or Image data types." sql2000 ...

  7. ExtJS笔记 Ext.data.Types

    This is a static class containing the system-supplied data types which may be given to a Field. Type ...

  8. Entity Framework Code First (七)空间数据类型 Spatial Data Types

    声明:本文针对 EF5+, Visual Studio 2012+ 空间数据类型(Spatial Data Types)是在 EF5 中引入的,空间数据类型表现有两种: Geography (地理学上 ...

  9. Core Java Volume I — 3.3. Data Types

    3.3. Data TypesJava is a strongly typed language(强类型语音). This means that every variable must have a ...

随机推荐

  1. 《linux 进程管理》- ps/top/kill/nice

    一:进程简述 二:ps 查看进程 语法 ps * -A 列出所有进程,和 -e 同等效果 * -a 列出不和本终端有关系的所有进程 * -w 显示加宽,可以显示较多信息 * -u 显示有效使用者相关的 ...

  2. 注解之@CookieValue

    @RequestHeader以及@CookieValue这两个注解用法类似,属性也相同,所以,写在一起.二者属性和RequestParam的属性一样,用法也几乎一样. 作用 @RequestHeade ...

  3. 原生js可视加载图片、延迟加载、懒加载

    <script> //既视加载//var oBtn = document.getElementsByTagName('button')[0];var aImages = document. ...

  4. python基础教程 变量/输入输出/if判断

    python的运用越来越多.大数据经常被人谈及,数据从何而来?通过各个平台.app.网站数据的收集,分析,过滤,生成报告,这些都可以用python来处理,并且有很多成熟的库可以直接用了.那还不赶紧深入 ...

  5. CentOS 下安装 Node.js 8.11.3 LTS Version

    Node.js是一个事件驱动I/O服务端JavaScript环境,基于Google Chrome V8 JavaScript引擎,简单说是运行在服务端的 JavaScript.下面我们来演示一下Cen ...

  6. Python递归优化方法

    递归栈溢出 Python的递归调用栈的深度有限制,默认深度为998,可以通过sys.getrecursionlimit()查看. 针对递归栈溢出,我们可以将默认深度设置为大一些,这样不会报错,但是再大 ...

  7. kafka4 副本机制

    概述 每个分区有n个副本,可以承受n-1个节点故障. 每个副本都有自己的leader,其余都是follower. zk中存放分区的leader和 follower replica的信息.(get /b ...

  8. vertical-align:middle实现图片与文字垂直居中对齐

    css代码: header .logo{ display:inline-block; margin-left: 10px; width: 15%; line-height: 9.1rem; backg ...

  9. squid 快速配置

    安装 yum install squid -y yum install httpd-tools -y 基本认证配置文件 #网络 http_port dns_nameservers 100.100.2. ...

  10. centos下如何清除重复的$PATH变量值

    运行: vim /etc/profile 添加如下代码: awk -F: '{    sep = ""    for (i = 1; i <= NF; ++i)        ...