These Python interview questions and answers are the ones I’d expect in a 2026 interview, from fresher basics to OOP, generators, the GIL and Python 3.14. Each answer is the short version an interviewer wants, plus the follow-up trap that often comes next.
Warm up with this one. If you can explain why it changes a, you already understand the idea behind a dozen questions on this page:
a = [1, 2, 3]
b = a
b += [4]
print(a) # [1, 2, 3, 4]
My test bench was Python 3.12.5 plus 3.14.8 and its free-threaded build, and the output blocks you’ll see are pasted straight from those runs.
Freshers can stop after the first four sections. If you’re going for a senior role, you’ll get the most from memory and the GIL, the coding problems and modern Python.