Python Basics 2

Source: Internet
Author: User

1,pycharm Installation and use

Community Edition

Professional Edition English version

2, formatted output: %s%d%f

3,while ... Else

when the while loop is interrupted by A break, it does not go to the else program

4, operator

logical operator and with (0 with zero) or or (or a get one) not non-

first Case The logical operators are all comparison operations before and after

Priority level: ()> Not >and > or, same level from left to right

The second case The logical operators are all numbers before and after

x or Y, X is true, the value is x,x is false, and the value is y;

X and Y, X is true, the value is y,x false, and the value is x.

Conversion of bool value

INT----->bool not 0 is True , 0 is False

Bool----> int True is 1 , false is 0 .

Numbers and

5, the first knowledge of coding

The storage of computer files, and the transfer of files, are all 0101

primary password This ASCII letter special character number 8 bit = = 1 bytes

One byte represents one character

Characters: the smallest unit of content composition

Universal Code :Unicode creates a character with two bytes at the beginning of its creation.

Upgrade Four bytes represents a character.

Waste of resources

upgrade utf-8 to Unicode : Use a minimum of 8 digits to represent one character

China --Medium: three bytes

European Writings : two bytes

GBK: National standard. Letter one byte, man two bytes

Python Basics 2

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.