Python Beginner's essays

Source: Internet
Author: User

Python Common commands:

1.python or Python3 Open the interactive Python interpreter

2.python hello.py Run a python script from the command prompt

Interactive Python interpreter common commands: Eixt () exit

Python Common syntax:

1.print (' Hello word ') Note: python2 supports print ' Hello World ', but Python3 does not support

The 2.# comment indicates that the line is a comment

3.\ ' represent ' \ is an escape character

4.100000000000000000L is right in Python, but cannot contain L in Python3

The 5.STR,REPR function converts a Python value to a string, repr can display L for long integers

6.input assumes that the user entered a valid expression, while Raw_input is the default string

7. "'" contains characters that can be written across lines

8. The original string starts with R and is equivalent to @ in C #

9.Unicode string prefixed with u

Python Beginner's essays

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.