Learning notes for Python/002-2 (2018-5-19)

Source: Internet
Author: User
3.1 built-in type
3.1.1 Numeric type

Numeric Type integer Type floating-point types Boolean type plural
int long Float bool Complex

1) Integer type
After Python 3, the integer type is int and no longer distinguishes between integers and long integers (int and long in Python 2.x), and the length of integers is not restricted (except for hardware physical limitations).

(1) integers can be expressed in a variety of binary notation:
Decimal: 0~9 Combination
Binary: 0b/0b +0~1 combination
Octal: 0o/0o +0~7 combination
Hex: 0x/0x +0~9,a~f Combo

Want to know the type of a data can be viewed using the type () function parameter

Programs that may be used by Python in a CMD writer program to clear the screen
Incomplete Clear Screen

Complete Clear Screen

(2) conversion between different systems
Oct (), Hex () can convert decimal integers to octal, hexadecimal

2) Floating-point number type

3) Boolean type
Boolean type has only two values of true or Fasle
4) plural
Just know that her representation is in the form of A+BJ.

Learning notes for Python/002-2 (2018-5-19)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.