Python Interview Questions and Answers

1. What is Python’s Global Interpreter Lock (GIL)? A Global Interpreter Key is a mutex that protects Python object access and prevents multiple threads from executing Python bytecodes at the same time. This can limit thread parallelism, affecting the performance of multi-threaded Python programs. 2. In Python, what is the difference between __str__ and __repr__? …

Python Interview Questions and Answers Read More »