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. Python 常用的日期时间命令

    今天用到自动添加当前时间,居然把之前的知识忘了,特整理常用的日期时间命令 代码: # 获取当前时间# import time# localtime = time.localtime(time.time ...

  2. 运行vs2010,Debug时发生“无法启动程序"http://localhost:xxx",系统找不到指定文件

    网上参考回答:应该是Visual Studio不能启动浏览器导致的结果!第一种结果是没有设置默认的浏览器,第二种情况是注册表被修改了! 我的尝试: 1.在启动处点击下三角,选择“使用以下浏览器浏览” ...

  3. Jenkins send build artifacts over ssh配置

    配置jenkins远程部署的时候遇到的配置问题: 首先在系统设置-系统设置-Publish over SSH-SSH Server中配置服务器信息 配置完成后可以点击Test Configuratio ...

  4. JavaWeb学习总结——文件上传和下载

    在Web应用系统开发中,文件上传和下载功能是非常常用的功能,今天来讲一下JavaWeb中的文件上传和下载功能的实现. 对于文件上传,浏览器在上传的过程中是将文件以流的形式提交到服务器端的,如果直接使用 ...

  5. 报错解决——OSError: libdarknet.so: cannot open shared object file: No such file or directory

    在python目录下打开终端,输入 python darknet.py 结果报错 Traceback (most recent call last): File “darknet.py”, line ...

  6. LeetCode之有效括号

    class Solution:    def isValid(self,s):         #第一步,if 判断传入为空的情况        if s == "":      ...

  7. abap异常处理 , update module

    1:异常 https://www.cnblogs.com/rainysblog/p/6665455.html 2:update module https://www.cnblogs.com/cindy ...

  8. sap gui 配置

    1: sap gui 安全配置 ,在左下角搜索sap gui configuration.

  9. Python处理Excel和PDF文档

    一.使用Python操作Excel Python来操作Excel文档以及如何利用Python语言的函数和表达式操纵Excel文档中的数据. 虽然微软公司本身提供了一些函数,我们可以使用这些函数操作Ex ...

  10. 添加了unimportant 之后,需要调整的参数

    count = count1+count2-count_unimportant_union*10 这个10需要调参.因为我们TOPN取的是10,所以如果两个词完全相同,正常情况下会有22个非0值.( ...