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 ...
随机推荐
- SQL instr()函数的格式
格式一:instr( string1, string2 ) / instr(源字符串, 目标字符串) 格式二:instr( string1, string2 [, start_positio ...
- SSH的通讯和认证
SSH的通讯和认证 转自:http://blog.sina.com.cn/s/blog_4e9440910100zxk0.html 之前一直对SSH的认证模棱两可,今天对SSH的通讯,认证和配置有了进 ...
- java JDBC (五) properties配置文件
1.在src目录下创建文件 database.properties driver = com.mysql.jdbc.Driver url = jdbc:mysql://192.168.0.207:33 ...
- UOJ244 短路 贪心
正解:贪心 解题报告: 传送门! 贪心真的都是些神仙题,,,以我的脑子可能是不存在自己想出解这种事情了QAQ 然后直接港这道题解法趴,,, 首先因为这个是对称的,所以显然的是可以画一条斜右上的对角线, ...
- 【PyQt5-Qt Designer】液晶显示屏(QLCDNumber)
液晶显示屏(QLCDNumber) 总体介绍 QLCDNumber小部件显示一个类似LCD的数字. 它可以显示任何大小的数字.它可以显示十进制,十六进制,八进制或二进制数字.使用display()槽连 ...
- 这个zsh超级棒
https://github.com/robbyrussell/oh-my-zsh wget用法: http://man.linuxde.net/wget https://pan.baidu.com/ ...
- commonjs模块和es6模块的区别?
commonjs模块和es6模块最主要的区别:commonjs模块是拷贝,es6模块是引用,但理解这些,先得理解对象复制的问题,在回过头来理解这两模块的区别. 一.基本数据类型的模块 ./a1.js ...
- RN Animated透明度动画
主要代码解析: 如果我们希望吧Animated.Value从0变化到1,把组件位置从60px移动到0px,把不透明度从0编导1,就可以使用style的属性来实现 <Animated.Text s ...
- shell脚本循环和信号
条件判断 if 条件1:then COMMAND elif 条件2:then COMMAND else COMMAND(:) : 表示pass 不执行任何命令 fi 读取用 ...
- NYOJ 圈水池
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #i ...