0% found this document useful (0 votes)
13 views3 pages

Python Concepts Interview QA Final

The document provides a comprehensive overview of Python fundamentals and advanced concepts, including key features, data types, and differences between various constructs. It covers topics such as GIL, threading vs multiprocessing, and the use of decorators and generators. The content is structured as a Q&A format, addressing common queries and best practices in Python programming.

Uploaded by

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

Python Concepts Interview QA Final

The document provides a comprehensive overview of Python fundamentals and advanced concepts, including key features, data types, and differences between various constructs. It covers topics such as GIL, threading vs multiprocessing, and the use of decorators and generators. The content is structured as a Q&A format, addressing common queries and best practices in Python programming.

Uploaded by

thundergamerz403
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

PYTHON FUNDAMENTALS Q&A

1. What are Pythons key features?

- Interpreted, Dynamically Typed, High-level, Object-Oriented, Vast Standard Library, Cross-platform.

2. Difference between list and tuple?

- List is mutable, Tuple is immutable.

3. Explain *args and **kwargs.

- *args: Non-keyworded variable length arguments.

- **kwargs: Keyworded variable length arguments.

4. What are Python's data types?

- int, float, complex, bool, str, list, tuple, dict, set, frozenset, NoneType.

5. Difference between is and ==?

- is: identity (memory location); ==: value equality.

...

ADVANCED PYTHON Q&A

1. What is GIL?

- Global Interpreter Lock: Only one thread executes Python bytecode at a time.

2. Use case for threading vs multiprocessing?


- Threading: I/O-bound; Multiprocessing: CPU-bound.

3. What is interning?

- Python reuses small immutable objects (like strings, ints) for memory efficiency.

4. Mutable vs Immutable Types?

- Mutable: list, dict, set; Immutable: int, str, tuple, frozenset.

5. What is @staticmethod vs @classmethod?

- @staticmethod: doesnt receive class or instance.

- @classmethod: receives class as first argument.

6. Use of enumerate, zip, map, filter?

- Useful iterators to work with sequences efficiently.

7. How to debug Python?

- Use pdb.set_trace() or IDE debuggers.

8. What is __init__.py?

- Makes a folder a package.

9. How to type annotate?

- def func(a: int) -> str: ...

10. What is Pythonic code?

- Readable, idiomatic use of Python features.


And many more... covering decorators, generators, exception handling, memory profiling, testing, and best

You might also like