Python - 1. Built-in Atomic Data Types
From:http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.html
- 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的更多相关文章
- Python - 2. Built-in Collection Data Types
From: http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.htm ...
- Data Types
原地址: Home / Database / Oracle Database Online Documentation 11g Release 2 (11.2) / Database Administ ...
- Primitive Data Types
Primitive Data Types (The Java™ Tutorials > Learning the Java Language > Language Basics) http ...
- 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 ...
- 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 ...
- "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 ...
- ExtJS笔记 Ext.data.Types
This is a static class containing the system-supplied data types which may be given to a Field. Type ...
- Entity Framework Code First (七)空间数据类型 Spatial Data Types
声明:本文针对 EF5+, Visual Studio 2012+ 空间数据类型(Spatial Data Types)是在 EF5 中引入的,空间数据类型表现有两种: Geography (地理学上 ...
- 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 ...
随机推荐
- Go-学习之路
Go学习之路 环境搭建 基础知识 类型与变量 常量与运算符 控制语句 Array数组 slice切片 function函数 ...持续更新中
- python摸爬滚打之day05----字典
1.字典介绍 1.1 结构: {key1: value1, key2: value2, ....} ,由很多键值对构成. 在字典的key-value(键值对)中, key(键)必须是可哈希(不可变 ...
- 防止atoi函数内存越界
函数形式为: int atoi(const char *nptr); 函数说明: 参数nptr字符串,如果第一个非空格字符不存在或者不是数字也不是正负号则返回零,否则开始做类型转换,之后检测到非 ...
- 8.0-uC/OS-III临界段
1.临界段 (临界段代码,也叫临界区,是指那些必须完整连续运行,不可被打断的代码段) 锁调度器,可以执行ISR,开启调度器不可执行ISR: (1).临界段代码,也称作临界域,是一段不可分割的代码. u ...
- lsof 命令
[root@localhost ~]# lsof COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME init root cwd DIR , / in ...
- dxCalloutPopup 简单使用教程
Panel1.Visible := False; // 设置panel初始不显示 dxCalloutPopup1.PopupControl := Panel1; // 设置弹出窗口内容为哪个控件 dx ...
- 002-读书笔记-企业IT架构转型之道-阿里巴巴中台战略思想与架构实战-第二章 构建业务中台的基础-共享服务体系简介
2.1.回归SOA的本质-服务重用 SOA理念的核心价值:松耦合的服务带来业务的复用,通过服务的编排助力业务的快速响应和创新. 现有模式多是烟囱式结合 ESB 企业总线打通不同系统间的交互. 2.2. ...
- NYOJ 食物链(WA)
1.WA代码 思路:预先分好3类,对每一行数据进行分类和真话假话判断 WA原因:前面某些行的数据 需要依赖 后面某些行给的数据 才能进行分类 初步改正思路( 对于前面给的无法直接分类的数据进行记录,等 ...
- xshell帮助
查看内置命令 $help Internal Commands:new: Creates a new session.open: Opens a session or the session dialo ...
- Spark --- 启动、运行、关闭过程
// scalastyle:off println package org.apache.spark.examples import scala.math.random import org.apac ...