Python beginners and python beginners

Source: Internet
Author: User

Python beginners and python beginners

#! /Usr/bin/env python
#-*-Coding: UTF-8 -*-
# The above is the beginning of the configuration compiling environment
# The first line env indicates the python version (2.x or 3.x) in the current environment variable)
# The second line indicates that the encoding format is UTF-8, which supports Chinese comments or Chinese output of strings (supported by default above 3.x)

Print 'Hello world' # print the first simple code hello world
Print ('Hello World') # Add () to the print statement above python3.x to indicate that it is similar to some languages such as java.
Print 'Hello \ nworld' # Add \ n to print to indicate a line break, which is similar to entering the Enter key when you input the txt text.
Print ('Hello \ tworld') # in print, \ t represents the split string, similar to adding tab or space spacing in the middle.
When print '\ "' # print special character backquotes", add a backslash \ To tell the compiler to recognize it.
Print "\" # Same as above
Print """
What's your name
My name is Cookie
Tanks Watching
"""
# A tip for printing. Three double quotation marks (single quotation marks) can be printed as user input, similar to txt text.
# New Recommendations PyCharm + windows system + installation python-x86-install, 32-bit installation package (64-bit System Support) Many python third-party applications 32-bit to find
# Python Official Website: https://www.python.org/official Third-Party Library: https://pypi.python.org/pypi
# Print the result as follows:

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.