Python Learning Note 1

Source: Internet
Author: User

1. Developing IDE Pycharm hack

Go to official Download (https://www.python.org/downloads/) The latest version, then select License Server, enter: Http://xidea.online. Crack. Now it is very easy to use, later difficult to say.

2.PIP (Windows edition) The default Python is not installed and needs to go to the official download. Download complete, use the Administrator command line, enter the PIP directory, and then enter: Python setup.py install. Install the package directly with the Python pip install requests,

3.python type

Python is a weakly typed language without declaring variable names: for example: Name=zhang

3.1 int and long, when the variable of an int exceeds 2*32-1, it automatically becomes a long.

3.2.bool type: True and False note that both true and false first letters are capitalized.

3.3 String: "character" "string" "and" "" "are all multi-line strings.

Example: s= ' s '

ss= "SS"

Sssr= ""

S

S

S

‘‘‘

3.4 Comment Pyhton single-line comment with #, multiline comment with "'", select multiple rows by pressing ctrl+/to annotate the selected row.

4. If elif else: in Python the Else if Jane is written in elif,if after the condition has no parentheses, with: Identify the following code is the child code, to have indentation.

If 5>3:

Print ("5 large")

Elif 10>5:

Print ("5 small")

The code block is represented by indentation in 5.python. The indentation distance of the same piece of code should always be, inconsistent error.

6.while True: All is used: as the end of the judging condition, break can jump out of the loop.

7.for I in range (3): Here is I starting from 0, looping 3 times.

Python Learning Note 1

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.