Python environment installation and basic grammar (2) - data type identifier, language classification

High-level language development

Structured language: the order (step of), branched, cyclic describe the problem

Object-oriented languages: approaching human cognition, all things into abstract objects, relationships between objects into abstract classes and inheritance

 

= + Algorithm program data results

 

Python interpreter

CPython: C language development, the most extensive, multi-support plug-ins

IPython: Enhanced Interactive CPython

PYPY: written by python language python interpreter, high efficiency

 

Python basic grammar

(1) dimension text annotation #

(2) to an integer int; Hex: 0b binary, 0o octal, 0x hex; bool: true 1, false 0

        Float (double)

        Complex number 1 + 2j

(3) the use of a single string, double quotes as a boundary symbol, reference character sequence

        Mono triple quotes: Can interbank, which is free to insert single or double quotation marks

        prefix r: r string with a prefix before, no special processing string

(4) an escape sequence \\ \ t (table) \ r (return) \ n (newline) \ '\' '

(5) using python indentation indention hierarchy

(6) using the end of line continuation lines \

(7) the identifier of letters (case insensitive), numbers, underscores

        Can not start with a number, the system can not use the keyword

 

Python language type

Statically compiled language: declare a variable type, type can not be changed, compile-time checking

Dynamically compiled language: do not declare the type, ready to be assigned to other types, do not know what type of programming, error-prone

Strongly typed languages: operation between different types of variables, to be cast into the same type

A weakly typed language: variables can be of different types, automatic implicit conversion

Guess you like

Origin www.cnblogs.com/omgasw/p/11585525.html