Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What is the basic knowledge of zero-basic entry Python

Shulou Source: shulou.com Published: 2022-06-01 19:41:02 10月04日 Update

This article mainly explains "What are the basics of Python with zero basics?" Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let Xiaobian take you to learn "What are the basics of Python with zero basics"!

1. Variables and types

Variable naming, variable usage, type query, type conversion

Numbers and strings and common data structures

integer, floating-point, complex, string, string operations

3. Character coding

The use of list: definition of list, addition, deletion and search of elements, slice, traversal, subscript crossing; the use of tuple: definition of tuple, conversion of tuple and list, characteristics of tuple, etc.; the use of set: definition of set, difference from list. Common operations: intersection, union, difference set, etc.; dictionary use: dictionary definition, dictionary addition, deletion, search, delete key, traversal

4. Operators

Arithmetic operators: +, -, *,/, %, **,//

Comparison operators: ==,!=、、> 、

< 、>

= 、

Member operators: in, not in

Identity operators: is, is not

operator precedence

5. Branch structure

Indent between codes, if-else, if-elif-else, nested if (else, elif)

6. Circular structure

for loop, while loop, continuu keyword, break keyword, return keyword

7. Use of functions and modules

Function action, def statement, list in function, magic parameter, function call, function return value (no return value, multiple return values, single return value), import, from... import .. , from import .. as

8. Object Oriented

Understanding object-oriented; object-oriented search characteristics: abstraction, encapsulation, inheritance, polymorphism; what is a class; class creation, initialization, instantiation; attribute access; class inheritance; calling parent class methods; built-in class attributes.

9. Operation of documents

open() function; methods of reading files: read(), readline(), readlines(); path of files; write files: overwrite, append; exception handling (try.. except.. finally) :FileNotFoundException...; with.. open; store & read JSON format data: json.dump() and json.load(); data persistence: csv, excel operations.

10. Processes and threads

Processes: multiprocessing modules, process pools, interprocess communication

Thread: thread module, threading module, Lock class, Condition class, Thread class, thread pool

The relationship and distinction between threads and processes

parallel and concurrent

synchronous and asynchronous

Creating multithreading

In addition, you should be familiar with common modules, such as re, os, sys, datetime, time, math, lambda function, decorator, generator, iterator, magic function, computer network, protocol: http protocol, tcp protocol, udp protocol and other basic knowledge.

At this point, I believe that everyone has a deeper understanding of "zero-based Python basics", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!

Tags: Operations functions operators foundations modules threads processes basics knowledge characters files keys keywords variables dictionaries strings objects commonly used data methods Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology NVidia OPPO Reno Shulou Tech Info MariaDB