You may encounter a variety of interview questions during the Python interview process. Here is a comprehensive summary that covers all aspects of the interview, hoping to help you with your interview.
This knowledge can be distinguished from the following aspects:
A language.
1. Recommend the best Python book you’ve read?
2. What about Python decorators, iterators, yield, memory management, etc.?
3. Which library thread safe queue is it? Which one is not safe? Is Logging thread-safe?
4. What are the scenarios where Python works? What about computationally intensive tasks?
5. Python high concurrency solution? – What about computationally intensive, IO intensive tasks
Operating system
Think of it as Linux, since that’s where most of the back-end work is.
1. TCP/UDP? TCP sticky packet is how to return a responsibility, how to handle? Udp sticky packet?
2. What about time_wait? What might be the cause of excessive CLOSE_wait?
3. The difference between epoll and select? Edge trigger, horizontal trigger difference?
4. The Http protocol
3. Store
Storage may include RDBMS, NOSQL and cache, etc. I use mysql,redis for example mysql related
Mysql character set and collation
2. What is the difference between varchar and char? Size limits? The maximum number of characters vARCHar can store in utF8 character set
3. What is the difference between primary key and unique?
4. What is the use of foreign keys and should they be used? Does a foreign key need an index?
5. What is the difference between MyISam and InnoDB? What is innoDB’s two-phase locking protocol?
6. What is the use of indexes? What is the general principle? What should I pay attention to when designing indexes?
Redis related
1. When to use Redis and why mysql is not suitable?
2. What about Redis? Simulate atomic +1 operations with transactions? Are there other solutions to atomic manipulation?
3. What happens when The Redis memory is full?
4. Security
Web security
1. How is SQL injection generated and how can it be prevented?
2. How can XSS be prevented? Can XSS be avoided after HTMLescape?
3. What is CSRF? How does Django protect against this?
The password techniques
1. What is your opinion of MD5 (Hash) algorithm, and its advantages and disadvantages?
2. What is the process of HTTPS?
3. The difference between symmetric encryption and asymmetric encryption?
4. How do I generate a shared key? How do I protect against man-in-the-middle attacks?