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 ...
随机推荐
- java之反射的基本介绍
什么是反射 JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法:对于任意一个对象,都能够调用它的任意一个方法:这种动态获取的以及动态调用对象的方法的功能称为Java的反射 ...
- Code once, debug everywhere.
1.通常语言调用一个函数会出exception的情况,在javascript里面返回的是undefined.等到程序运行不正常的时候,你看到数据结构的有些地方为什么是undefined,只能哭了. 2 ...
- Laravel展示产品-CRUD之show
上一篇讲了Laravel创建产品-CRUD之Create and Store,现在我们来做产品展示模块,用到是show,①首先我们先修改controller,文件是在/app/Http/Control ...
- what's the 跨期套利
出自 MBA智库百科(https://wiki.mbalib.com/) 跨期套利的定义 跨期套利是套利交易中最普遍的一种,是股指期货的跨期套利(Calendar Spread Arbitrage)即 ...
- mysql在linux上的安装
前提: 环境:workstation 11 + CentOS 7 + mysql-5.6.40 安装前先查看服务器里是否有老版本的mysql已经被安装了 rpm -qa|grep mysql 如果有就 ...
- vue在页面嵌入别的页面或者是视频2
vue在页面嵌入别的页面或者是视频 以下是嵌入页面 <iframe name="myiframe" id="myrame" src="http: ...
- HTTP协议(TCP/IP)
HTTP协议(TCP/IP): 服务器套接字(TCP用主机的IP地址加上主机上的端口号作为TCP连接的端点,这种端点就叫做套接字(socket)或插口) 数据包(请求包.报文)http 请求格式: ...
- ELKStack的基础入门和中文指南
一.ELKStack的中文指南 redhat系列配置repo源 rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch vi / ...
- LVS+Keepalived高可用部署
一.LVS+Keepalived高可用部署 一.keepalived节点部署 1.安装keepalived yum install keepalived ipvsadm -y mkdir -p /op ...
- php-fpm sock 进程池优化
更改tcp为sock ;listen = 127.0.0.1:9000 listen = /dev/shm/php-cgi.sock pm = static \\静态进程池 pm.max_childr ...