04 November 2020

#Python

#Python

Key Concepts


S.No Topic Sub-Topics
1Setup & BasicsInstall Python, IDE Setup, Hello World, Python REPL, Python Versions
2Python SyntaxIndentation, Comments, Variables, Data Types, Naming Conventions
3OperatorsArithmetic, Comparison, Logical, Assignment, Membership
4Control Flowif/else, elif, for loop, while loop, break/continue
5Functions Basicsdef keyword, parameters, return statement, scope, lambda functions
6Data Structures ILists, Tuples, Sets, Dictionaries, Basic operations
7Data Structures IIList comprehensions, dict comprehensions, slicing, indexing, nested structures
8String ManipulationString methods, formatting, f-strings, slicing, encoding/decoding
9Modules & Packagesimport, from ... import, creating modules, __init__.py, pip install
10File Handlingopen/read/write, with statement, file modes, os module, pathlib
11Exception Handlingtry/except, finally, raise, custom exceptions, assertion
12OOP BasicsClass, Object, self, __init__, instance vs class variables
13OOP AdvancedInheritance, Polymorphism, Encapsulation, Abstract Base Class, super()
14DecoratorsFunction decorators, @decorator syntax, nested functions, functools.wraps, practical examples
15Generators & Iteratorsiter(), next(), yield, generator expressions, infinite generators
16ComprehensionsList, Dict, Set, Nested comprehensions, Conditional comprehensions
17Python Standard Librarymath, random, datetime, collections, itertools
18Regular Expressionsre module, match/search/findall, groups, patterns, flags
19File FormatsCSV, JSON, XML, pickle, reading/writing files
20Virtual Environmentsvenv, pipenv, conda, requirements.txt, activate/deactivate
21Logginglogging module, log levels, formatters, handlers, configuration
22Unit Testingunittest, assert methods, test cases, setup/teardown, pytest basics
23Debugging & Profilingpdb, breakpoints, cProfile, timeit, memory profiling
24Concurrency IThreading, Thread class, start/join, GIL, thread-safe operations
25Concurrency IIMultiprocessing, Process class, Pool, Queue, shared memory
26Async Programmingasync/await, asyncio, event loop, tasks, coroutines
27Web Scrapingrequests, BeautifulSoup, parsing HTML, scraping tables, exception handling
28APIs & JSONREST APIs, requests module, json load/dump, handling responses, authentication
29Data Analysis BasicsNumPy, pandas, Series/DataFrame, basic operations, filtering
30Visualizationmatplotlib, seaborn, plot types, customization, saving plots

Interview question

Basic Level

  • What are Python?s key features?
  • What is the difference between Python 2 and Python 3?
  • How is memory managed in Python?
  • What are Python?s data types?
  • What are mutable and immutable data types in Python?
  • What is PEP 8 and why is it important?
  • How do you comment code in Python?
  • What is indentation and why does Python use it?
  • What are Python?s built-in data structures?
  • What is the difference between a list and a tuple?
  • What is a dictionary in Python?
  • What is the difference between shallow copy and deep copy?
  • What is the use of id() function in Python?
  • What are local and global variables?
  • How do you take user input in Python?
  • What is the difference between is and ==?
  • How can you convert a string to a number?
  • What are Python keywords?
  • What is the purpose of the pass statement?
  • What is slicing in Python?

Intermediate Level

  • What is list comprehension and give an example?
  • What are lambda functions?
  • Explain the use of map(), filter(), and reduce().
  • What are generators in Python?
  • What are iterators in Python?
  • How do you handle exceptions in Python?
  • What is the difference between @staticmethod, @classmethod, and instance methods?
  • What is the difference between deepcopy and copy modules?
  • What are Python modules and packages?
  • What is the purpose of the __init__.py file?
  • What is *args and **kwargs used for?
  • How do you open and read files in Python?
  • How can you write to a file in Python?
  • What are decorators and why are they used?
  • How can you use the with statement in file handling?
  • What is the difference between Python arrays and lists?
  • What are Python namespaces?
  • Explain the difference between shallow and deep copy.
  • What is the use of enumerate() function?
  • What are Python closures?

Advanced Level

  • What are metaclasses in Python?
  • Explain the Global Interpreter Lock (GIL).
  • What are Python descriptors?
  • What is monkey patching?
  • How does memory management work in Python internally?
  • What are context managers?
  • What are Python coroutines?
  • Explain how Python?s garbage collector works.
  • What is the difference between @property and normal methods?
  • What is the difference between __new__ and __init__?
  • Explain the difference between multiprocessing and multithreading.
  • How can you achieve thread safety in Python?
  • What is the purpose of the async and await keywords?
  • What is the difference between yield and return?
  • How do you optimize Python performance?
  • How is exception chaining handled in Python?
  • What are data classes in Python 3.7+?
  • What is the difference between __str__ and __repr__?
  • What are function annotations?
  • How to use type hinting in Python?

Expert

  • How do you design custom metaclasses?
  • How does Python?s memory allocation and reference counting work?
  • How does the GIL affect concurrency in Python?
  • How can you bypass the GIL for CPU-bound operations?
  • What are weak references in Python?
  • Explain interned strings in Python.
  • What is the role of sys.getrefcount()?
  • How can you embed Python into a C/C++ program?
  • What is Cython and how does it improve performance?
  • How do you use the inspect module for introspection?
  • How can you serialize and deserialize objects using pickle?
  • What are Python?s built-in optimization techniques?
  • What is JIT compilation in PyPy?
  • How can you write thread-safe code in async applications?
  • What is metaprogramming in Python?
  • How to implement custom context managers using __enter__ and __exit__?
  • How do you create and use abstract base classes (ABC)?
  • What are memory leaks in Python and how do you detect them?
  • How do you debug performance bottlenecks in Python code?
  • How would you design a large-scale system using Python efficiently?


Related Topics


   RoadMap   
   TensorFlow   
   PyTorch   
   Pandas   
   Scikit   
   Keras   
   NumPy