INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 1–5 of 5 questions
Learn Python for DevOps →1.Why use a virtual environment?Beginner
It gives each project its own Python packages, so versions never clash between projects and your system Python stays clean.
2.What is the difference between a list and a dict?Beginner
A list is an ordered group of items you reach by position. A dict stores values under names (keys), so you reach them by key.
3.How do you read a file safely?Beginner
Use a with block: with open(path) as f. It closes the file even when an error happens. pathlib makes paths work on every system.
4.What does exit code 0 mean?Beginner
Success. Any other number means failure. CI systems and shells read this number, so scripts should exit non-zero when they fail.
5.What is the difference between a function and a module?Beginner
A function is a named block of steps you can call again and again. A module is a .py file that holds functions and other code, so you can import and share them.