18. Interview Questions and Answers
18.1 Python and Jupyter
Q1. Why use a virtual environment?
A venv isolates project packages so versions do not clash with other projects. I create one per course or client project and install pandas, numpy, matplotlib and seaborn there before launching Jupyter.
Q2. List vs dict — when do you use each?
A list is an ordered sequence (e.g. city names). A dict maps keys to values (e.g. city → manager). For tabular analysis I move to pandas quickly; lists/dicts stay for small configs.
Q3. What is a Jupyter notebook good for?
Combining code, results and markdown narrative in one place — ideal for EDA and sharing an analysis path. For production pipelines I would later refactor stable code into .py modules.
Ravindra Bagale's Tip
In an interview, do not stop at "I know Python"; describe a habit you really follow. For example, say that you make one venv per project, install pandas, numpy, matplotlib and seaborn inside it, and save the versions with pip freeze > requirements.txt. For notebooks, say that you restart the kernel and run all cells before sharing, so the results do not depend on cells run out of order.
Ravindra Bagale's Tip – मराठी
Interview मध्ये फक्त "मला Python येतं" एवढ्यावर थांबू नका; तुम्ही खरंच पाळता ती सवय सांगा. उदाहरणार्थ, तुम्ही प्रत्येक project साठी एक venv बनवता, त्यात pandas, numpy, matplotlib आणि seaborn install करता, आणि pip freeze > requirements.txt ने versions save करता हे सांगा. Notebook बद्दल सांगा की share करण्याआधी तुम्ही kernel restart करून सगळे cells run करता, म्हणजे cells मागेपुढे चालवल्यामुळे results बदलत नाहीत.
Ravindra Bagale's Tip – हिंदी
Interview में सिर्फ़ "मुझे Python आता है" कहकर मत रुको; वह आदत बताओ जो तुम सच में अपनाते हो। जैसे, बताओ कि तुम हर project के लिए एक venv बनाते हो, उसमें pandas, numpy, matplotlib और seaborn install करते हो, और pip freeze > requirements.txt से versions save करते हो। Notebook के बारे में बताओ कि share करने से पहले तुम kernel restart करके सारे cells run करते हो, ताकि cells आगे-पीछे चलाने से results न बदलें।