← Back to videos

Python mock interview: imports that cause errors

A mock interview for a Junior Python Developer role, in which the conversation unexpectedly veered entirely towards the topic of imports. We break down what an import is, the differences between a module, a package and a library, what actually happens during an import, when the module’s code is executed, and why using `import *` inside a function can break the programme.

It turned out to be not just an interview, but an in-depth analysis of one of the most fundamental and underrated topics in Python. At the end — detailed feedback for the candidate: what went well, where the mistakes were, and how to grow more quickly into a confident junior developer.

Timecodes

00:00 Start
00:26 Introduction
01:36 Roman talks about himself
02:08 Interview format
04:00 Episode topic — imports in Python
05:50 Module, package, library
07:57 Package manager and libraries
11:16 What happens during an import
17:37 Re-importing and potential errors
22:17 Where to import correctly
25:27 Importing a module or individual functions
31:25 Absolute and relative imports
33:41 Code review
39:23 Why code fails with `import *`
47:22 Scopes and import conflicts
50:26 Final feedback
51:32 Roman’s self-assessment
52:02 Review of strengths and weaknesses