0% found this document useful (0 votes)
2 views1 page

Python Interview Questions Final

The document contains a list of 15 Python interview questions, covering topics such as mutable vs immutable objects, data structures, memory management, and Python's Global Interpreter Lock. It also includes coding challenges like grouping anagrams, finding duplicate files, and analyzing log files. Each question is designed to assess a candidate's understanding of Python concepts and practical coding skills.

Uploaded by

qghuj12280
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Interview Questions Final

The document contains a list of 15 Python interview questions, covering topics such as mutable vs immutable objects, data structures, memory management, and Python's Global Interpreter Lock. It also includes coding challenges like grouping anagrams, finding duplicate files, and analyzing log files. Each question is designed to assess a candidate's understanding of Python concepts and practical coding skills.

Uploaded by

qghuj12280
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Python Interview Questions (15)

1. Explain mutable and immutable objects with examples.

2. What is the difference between a list, tuple, set, and dictionary? When would you use
each?

3. Explain *args and **kwargs. Where would you use them in real projects?

4. What is the difference between shallow copy and deep copy? Explain with an example.

5. Explain Python's memory management. What are reference counting and garbage
collection?

6. What is the Global Interpreter Lock (GIL)? Why doesn't multithreading improve CPU-
bound applications?

7. Compare threading, multiprocessing, and asyncio. When would you choose each?

8. What happens internally when Python imports a module?

9. How are Python dictionaries implemented? What happens during a hash collision?

10. What are iterators, iterables, and generators? Explain the differences with examples.

Coding Questions
11. Group Anagrams: Given a list of strings, group all anagrams together.

12. Find Duplicate Files: Given a list of filenames, print duplicate filenames with their
occurrence count.

13. Log File Analyzer: Count INFO, WARN, and ERROR entries from a log file.

14. Find Missing Employee IDs: Given a sorted list of employee IDs, print all missing IDs.

15. Top 5 Most Frequent Words: Read a text file and print the top five most frequent words

You might also like