zoukankan      html  css  js  c++  java
  • Python

    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 NameOperatorExplanation
    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 anand Both operands True for result to be True
    logical or oor One or the other operand is True for the result to be True
    logical not nonot 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
    ../_images/assignment1.png
    ../_images/assignment2.png
     
     
  • 相关阅读:
    TCP三次握手过程
    btree b+tree 的关系
    volatile和指令重排序
    事务一致性理解 事务ACID特性的完全解答
    JVM 详解
    java 并发 详解
    socker TCP UDP BIO NIO
    mysql 主从复制 配置
    身份证格式验证 方法
    分布式事务 XA 两段式事务 X/open CAP BASE 一次分清
  • 原文地址:https://www.cnblogs.com/keepSmile/p/7878117.html
Copyright © 2011-2022 走看看