Python, python3

Source: Internet
Author: User

Python, python3

Use list in Python to sequence elements

Example:

L = [] # An empty list

L2 = [1, 2, 3] # A number list

L3 = ['A', 'B', 'C'] # a string list

L4 = [[3, 4], ['black', 'red', 'yellow'], [] # A list with a length of 3

 

The elements in the list can be of the same type or different types.

L5 = [1, "sdf", [34,56]


The first chapter of a basic python tutorial first describes how to install the fifth and sixth articles in python.

Terminal means the terminal. Because Python is cross-platform, you can understand it in terms of terminals.

In Windows, Start Menu --- run ----- CMD press Enter. This is the Dos interface, that is, the Terminal of Windows.

"The method for running python in Terminal is to input the program name and press the enter key ."

You have compiled a Python program named demo1, so you only need to enter demo1 and press Enter,
Then the program runs.

The first chapter of a basic python tutorial first describes how to install the fifth and sixth articles in python.

Terminal means the terminal. Because Python is cross-platform, you can understand it in terms of terminals.

In Windows, Start Menu --- run ----- CMD press Enter. This is the Dos interface, that is, the Terminal of Windows.

"The method for running python in Terminal is to input the program name and press the enter key ."

You have compiled a Python program named demo1, so you only need to enter demo1 and press Enter,
Then the program runs.

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.