Python portal, print, basic data, variables

Source: Internet
Author: User
Python portal, print, basic data, variables
  1. Where does the code begin?

    (1) Python is executed from the time the first script is loaded.
    Python test.py
    (2) In the script to call the other script inside the code and data
    Related code, put it in a. py file, irrelevant to the different. Py, a. PY can call other. PY, complete organized and disciplined organization

2.print function

(1) is an important system function
Print ("Hello world!!", "I am xxxx", 456, 36.7);
(2) The parameters can be any type, any number, passed to the Print,print function will be any number of parameters printed out, the logic implementation of print, is provided by Python internal
(3) printing more than one data, can be separated by commas

  1. Basic data

    (1) Base number: integers, decimals
    (2) String Object "Hello"
    (3) Basic numbers can be used in mathematical operations
    (4) Parentheses can change the precedence of mathematical operations
    (5) No brackets with curly braces, only parentheses
    (6) The string is added to the string to get the stitched string

Python portal, print, basic data, variables

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.