Python Basics for full stack development (1)

Source: Internet
Author: User

First, the basic knowledge

  1. There are two ways to run Python:
    • The first is run through interactive operation, through "start", "All Programs", "python3.x", "IDLE".
    • The second is that we write the Python file double-click Run.
  2. Help system for Python ()
    • We enter help () in interactive mode, enter the function name you want to query.
    • If you want to exit from the help mode into interactive mode, simply type in assist () after help>.
  3. Variable

      The suffix name of the
      • ' print ("Hello World")
      • python program needs to end with a. py. The
      • #!/usr/bin/env python file allows you to search for and start the interpreter. (both Windows and LINUXF can use an absolute path to start the interpreter)
      • --Coding:utf8--the sentence in Python3 is no longer necessary. (The storage location must be the first two lines of the program)
          * Ascill 00000000 & 00000001 Unicode 0000000000000000+ & 0000000000000001 in 0010000000          00000111110010 Utf-8 can be used to show how much is expressed in & 00000001 001000000000000111110010 Python3 no need to pay attention to Python2 each file appears in Chinese, the head must be  
      • input ()
        • input ("Please enter user name:")
        • input ("Enter password:") waits for user input until the user enters. The
      • variable name can only be made up of:
        • letter
        • number
        • underscore
        • special case: variable names cannot start with a number. You cannot use Python's keywords as variable names. Do not repeat with Python's built-in functions.
  4. Conditional statements
    • For indentation, generally use 4 spaces, try not to use the TAB key.
    • II. Basic data types

  5. String
    • data, text, enclosed in quotation marks.
    • Strings can be joined in addition to stitching
    • The string can be repeated many times using multiplication.
  6. Digital
    • The number has no quotation marks.
    • Numbers can do subtraction.
    • 35% 6 # get
    • Third, function
      Four, object-oriented

Python Basics for full stack development (1)

Related Article

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.