Python interview questions summary

Python syntax and other basic parts#

  1. Mutable and immutable types;
    Answer: When defining variables (objects):
    Every time an object is created, the object will have: id, type, and value.
    id: reaction memory address
    type: Objects have their own types, different types have different characteristics, and different methods
    value: data
Variable type:

Immutable type####

  1. The realization method and difference between shallow copy and deep copy; how to realize deepcopy if you design it;
  2. The difference between new() and init();
You know several design patterns;

Have you understood encoding and decoding;

The pros and cons of list comprehension and generator;

What is a decorator; if you want to decorate after a function, what should be done;

Hand-write a singleton pattern implemented using decorators;

What is the difference between a singleton using a decorator and a singleton using other methods in subsequent use;

Handwriting: regular email address;

Introducing garbage collection: reference counting/Generational collection/Isolated reference ring

The difference between multi-process and multi-thread; what is suitable for CPU-intensive;

There are several ways of process communication;

Introduce the coroutine, why it is faster than the thread;

The difference between range and xrange (my sister’s py3...);

Author: Love techniques fairy sauce
Link: https://www.jianshu.com/p/de345e713f4c
Source: Brief Book
The copyright belongs to the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

Recommended Posts

Python interview questions summary
Python interview questions
Python interview questions: string concatenation
Python interview questions collection (three)
LeetCode brushing questions summary python3
Python answers questions
Python basic summary
Python interview assault
Python processing json summary
Python advanced usage summary
Python classic interview question one​
Python high-order function usage summary!
Python high-order function usage summary!
Summary of logarithm method in Python
Python list comprehension operation example summary
A summary of 200 Python standard libraries!
Summary of Python calling private attributes
Python decorator simple usage example summary
Python classic programming questions: string replacement
Comprehensive summary of Python built-in exception types
Summary of common operations of Python time module
Summary of knowledge points about Python unpacking
Python file and directory operation code summary
Python process and thread summary case analysis