← Back to videos

Mock Junior Python Interview: Strings, Code Reading and Feedback

06.11.2026
Interview timeline Click any block to jump

Interview breakdown

Interviewer verdict
Passed with caveats Level: Entry-level Junior (solid foundational logic, early Python depth)

The interview was rated mostly positive with caveats: the candidate communicated confidently, showed sound foundational reasoning, and stated knowledge boundaries honestly. To reach a solid Junior bar, he needs more hands-on Python exposure, closer attention to every token when reading tricky code, broader developer vocabulary, and pragmatic use of AI tools.

Candidate: Artyom
Target role: Junior Python Developer

IT degree without industry experience · self-studying Python for ~4 months from open resources, first technical interview

Answers accuracy 16 total
56% score
Theory
5/13 correct · 62%
Live coding
0/3 correct · 33%
Practical task
Not solved

Disguised quine: printing the script's own source listing via str.format() and !r

The candidate read the top-level list and sum(orders) / len(orders) operations correctly, but skimmed past the contents of the report template string and overlooked the !r conversion specifier in .format(). He predicted the list and average would print, and could not explain how the script output its own full source listing including the leading comment.

Topics covered Click a topic to filter questions

Candidate strengths

  • + Calm, confident communication and natural technical dialogue in a very first interview
  • + Solid grasp of core CS concepts (literals, immutability, binary representation, two-stage execution)
  • + Honest acknowledgment of unfamiliar terms without guessing and resilience to pushback
  • + Sensible reasoning about code readability and the role of PEP 8 conventions in teams

Areas to improve

  • → Deepen practical Python syntax knowledge (conversion flags like !r, str.format templates, bytes vs str)
  • → Read code attentively without skipping unfamiliar tokens or string literals as unimportant
  • → Articulate a concrete step-by-step debugging plan whenever a code snippet is unfamiliar
  • → Broaden developer terminology and adopt AI assistants pragmatically for faster code exploration

Questions in this interview

16 / 16
01 ▶ 04:04
Is there still a point in learning programming languages like Python in the AI era?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Argued clearly that understanding how software works under the hood remains essential to guide tools, verify outputs, and advance engineering, drawing an analogy to medical expertise versus symptom search.

Key takeaway

LLMs accelerate boilerplate generation, but architecture, correctness, security, and debugging still require an engineer's foundational understanding.

Open moment on YouTube ↗
#01
02 ▶ 05:45
What is code obfuscation?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Honestly stated he had never encountered the term and declined to guess.

Key takeaway

Obfuscation intentionally transforms code into a hard-to-read form while preserving its runtime behavior to hinder reverse engineering.

Open moment on YouTube ↗
#02
03 ▶ 06:15
What is the str data type in Python and is it mutable or immutable?
Theory Strings, encodings & formatting
?
Candidate's answer

Classified strings as immutable sequences of characters typically defined via quoted string literals.

Key takeaway

Python's str is an immutable sequence of Unicode code points; every transformation allocates a new string object.

Open moment on YouTube ↗
#03
04 ▶ 06:47
What is a literal in programming and how does it differ from a computed expression?
Theory Data types, numbers & memory
?
Candidate's answer

Illustrated with an example: in x = 5, 5 is a fixed literal value written directly in source code, whereas 5 + y requires runtime evaluation.

Key takeaway

A literal is direct source-code notation for a fixed value (such as 42, 'abc', or True) recognized directly by the parser.

Open moment on YouTube ↗
#04
05 ▶ 07:43
Why does Python support single, double, and triple quotes, and are they interchangeable?
Theory Strings, encodings & formatting
?
Candidate's answer

Named all three forms, explained nesting quotes without escaping and multi-line strings/docstrings with triple quotes, though he wavered when pressed on strict interchangeability.

Key takeaway

All quote styles produce str objects: single/double quotes avoid escaping inner quotes, while triple quotes preserve literal newlines and define docstrings (PEP 257).

Open moment on YouTube ↗
#05
06 ▶ 12:21
Why not use triple quotes everywhere, and do PEP 8 style guidelines still matter today?
Theory Algorithms, code reading & engineering practices
?
Candidate's answer

Pointed out that using triple quotes everywhere violates PEP 8 conventions and hurts readability, since visual consistency helps developers parse intent quickly.

Key takeaway

Triple quotes signal docstrings or multi-line blocks, while teams enforce consistent single or double quotes via formatters like Ruff or Black.

Open moment on YouTube ↗
#06
07 ▶ 14:27
Can you delimit a Python string literal with a typographic apostrophe instead of an ASCII single quote?
Theory Strings, encodings & formatting
?
Candidate's answer

Reasoned correctly that if a typographic apostrophe has a different character code from the standard ASCII single quote, the parser will reject it as a string delimiter.

Key takeaway

Python's lexer only recognizes ASCII ' (0x27) and " (0x22) as string delimiters; typographic quotes like ’ (U+2019) raise SyntaxError.

Open moment on YouTube ↗
#07
08 ▶ 14:56
What is the ASCII table and how are text characters represented in computer memory?
Theory Strings, encodings & formatting
?
Candidate's answer

Correctly explained mapping characters to integer codes and binary bits, but mistakenly included Cyrillic in standard ASCII and conflated text encoding with bytecode compilation.

Key takeaway

Standard ASCII is a 7-bit table of 128 English and control characters; Python 3 strings use Unicode code points (ord/chr) and UTF-8 encoding for international text.

Open moment on YouTube ↗
#08
09 ▶ 18:01
How does compilation work in Python, is Python compiled or interpreted, and what implementations exist?
Theory Python internals, bytecode & runtime
?
Candidate's answer

Described CPython's two-step pipeline (compiling source into intermediate instructions, then executing on a virtual machine) and mentioned Cython, though he forgot the word 'bytecode'.

Key takeaway

CPython compiles source code into bytecode executed by the PVM, while alternatives include PyPy (JIT), MicroPython, and the Cython static compiler.

Open moment on YouTube ↗
#09
10 ▶ 20:15
Can you create a string in Python without writing any quotes?
Theory Strings, encodings & formatting
?
Candidate's answer

Suspected it might be possible given the question, but could not recall any way to construct a string without quotes.

Key takeaway

Strings can be created without quotes via str(), str(123), chr(65), or decoding byte sequences such as bytes([65, 66]).decode().

Open moment on YouTube ↗
#10
11 ▶ 21:18
How do byte strings (bytes), raw strings (r-strings), and f-strings differ in Python?
Theory Strings, encodings & formatting
?
Candidate's answer

Accurately explained r-strings (disabling backslash escapes) and f-strings (expression interpolation), and linked byte strings to network sockets, but missed the b'' prefix and the distinct bytes type.

Key takeaway

r'' and f'' still produce Unicode str objects, whereas b'' creates a distinct immutable bytes sequence of raw integers in 0..255.

Open moment on YouTube ↗
#11
12 ▶ 23:59
How does str.format() differ from f-strings, and when should you choose one over the other?
Theory Strings, encodings & formatting
?
Candidate's answer

Viewed f-strings as modern syntactic sugar for cleaner print statements, but treated choosing between f-strings and .format() mostly as developer preference.

Key takeaway

f-strings evaluate eagerly and compile to faster opcodes, while str.format() is ideal for reusable string templates populated later.

Open moment on YouTube ↗
#12
13 ▶ 27:24
What is syntactic sugar in Python and what is its main purpose?
Theory Control flow, loops & syntactic sugar
?
Candidate's answer

Gave good examples (list comprehensions vs .append(), decorators), but framed syntactic sugar mainly around saving CPU milliseconds rather than human readability and maintainability.

Key takeaway

Syntactic sugar primarily optimizes human readability and expressiveness; any bytecode speedup (as in list comprehensions) is a secondary implementation detail.

Open moment on YouTube ↗
#13
14 ▶ 31:02
What does the snippet with orders, average calculation, and print(report.format(...)) containing !r output?
Live coding Strings, encodings & formatting
?
Candidate's answer

Predicted the list of orders and its average would print; after seeing the script print its own source code, he could not explain how the output was produced.

Key takeaway

The !r conversion flag in str.format() applies repr() (preserving quotes and escapes), a classic building block for self-reproducing quine programs.

Open moment on YouTube ↗
#14
15 ▶ 38:44
Does Python keep comments at runtime, and why did the first-line comment appear in the terminal output?
Live coding Python internals, bytecode & runtime
?
Candidate's answer

Initially stated correctly that the parser strips comments, then doubted himself and guessed the first-line comment somehow triggered printing the source listing.

Key takeaway

Comments (# ...) are discarded during tokenization and never reach bytecode; the comment appeared in output only because its text was duplicated inside the template string literal.

Open moment on YouTube ↗
#15
16 ▶ 40:00
What is introspection in Python, what does the inspect module do, and when should you use AI versus manual code exploration?
Live coding Modules, packages, imports & stdlib
?
Candidate's answer

Correctly defined introspection as inspecting runtime objects and signatures (citing the inspect module), but insisted he would spend an entire evening manually probing unfamiliar code rather than using AI.

Key takeaway

Built-in introspection (type, dir, inspect) is vital for runtime analysis, while combining IDE navigation and LLMs with manual verification is far more effective in real engineering workflows.

Open moment on YouTube ↗
#16
Original video description & timecodes

I interview Artyom for a Junior Python role. We discuss Python strings, literals, ASCII, byte and raw strings, f-strings, introspection, and code reading, then I share feedback on his strengths and areas to improve.