---restore content starts---
Python is an object-oriented, interpreted computer programming language, invented by Dutchman Guido van Rossum in 1989, and the first public release was released in 1991.
Python has a rich and powerful library. It is often nicknamed the glue language and is able to easily connect a variety of modules made in other languages, especially in C + +.
Below I am a few of my beginner's knowledge points:
The most distinctive feature of 0:python is the use of indentation to represent blocks of code, without the use of curly braces {}.
1. Variables: No need to define keywords, such as x=10;
2. Notes: A single-line comment in Python begins with # , multiple lines of comments can be in several # numbers, and "and" " :
3.print The default output is line-wrapping, if you want to implement no line-wrapping need to add end= ""at the end of the variable:
4. Standard data type:
There are six standard data types in the Python3:
- Number (numeric)
- String (String)
- List (lists)
- Tuple (tuple)
- Sets (collection)
- Dictionary (dictionary)
Among the six standard data types of Python3:
- immutable Data (four): Number (numeric), string (string), tuple (tuple), sets (set);
- variable data (two): List, Dictionary (dictionary).
5. Variable Assignment:
A=b=c=1 indicates that three variables are assigned the same value
a,b=1,2 indicates that A and B are assigned values of 1 and 2 respectively.
6. Two methods of judging data types:
Type () does not consider a subclass to be a type of parent class
Isinstance () is considered a subclass of a type of parent class
7,string type slices:
Print (Str[ind,ind,step])-----ind refers to the corresponding subscript, step
8, condition control
If elif Else
9, loop
(1) While judging condition: code block
(2) for X in range (A, B)
---restore content ends---
Getting Started with Python