Python learning log for small y--a beginner's knowledge of Python

Source: Internet
Author: User

#本文仅为个人学习过程的整理和记录, if there is a blog from others, the site extracts the content, I will clearly mark, if there is infringement, please contact me, I will be deleted in the first time.

A first knowledge of Python

The history of 1.Python

(1) Python is an interpretive, object-oriented, high-level programming language with dynamic semantics (glue language).

(2) A brief history of Python:

1989 Guido Development, name origin

(3) Python development history:

Cnri period;

Beopen period;

DC Time (Zope system);

Python3.0;

2.Python Features

(1) Python's positioning in the programming language:

"Scripting language" (scripting language)

Higher-order dynamic programming languages

(2) Features

Easy to learn: Python is a language that represents simplicity, and Python's pseudo-code essence is one of its greatest strengths. Simple syntax, easy to get started.

Explanatory & Compiler: Python-written programs do not need to be compiled into binary code, can be run directly from the source code, but requires an interpreter (like Matlab), Python also has the characteristics of compilation execution

Object-oriented: Python supports object-oriented programming and enables object-oriented programming in a simple and powerful way that supports process-oriented. (Familiar attributes can be used as objects: variables, classes can be objects, objects have a broader concept)

High-level language: No need to consider the underlying (#) Management memory class )

Extensibility and embeddable: Embed python into things like C or C + +

Portability: Python can be ported to many platforms

Rich library: Python's standard library is huge

Free, open source

#他人总结的特点:

Perfect combination of ease of use and speed

Focus on solving the problem

Cross-platform and easy to scale

Automated memory management

Built in many high-order and practical data forms

Easy integration of Network program modules

Application of 3.Python

4.Python Environment Construction

Linux Environment:

Most Linux distributions install the Python environment by default

Windows environment:

Download installation

4.Python Environment Construction

Python's interactive mode and text mode

5.Python file type (#Need Review)

Source

Python source code file with. py extension, interpreted by the Python program, do not need to compile;

#!/usr/bin/python

Print (' Hello world! ')

BYTE code

Python source files are compiled to generate files with the. pyc extension

Compile Method: Import Py_compile

Py_compile.compile ("hello.py")

Optimized code

Optimized source files with the extension. pyo

Method: Python-o-m

Py_compile hello.py

All of the above three can be run directly.

Python learning log for small y--a beginner's knowledge of Python

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.