Python: practice, test and prove it
A 10-question test on lists, dicts, slicing, exceptions and files, with every answer explained.
FreeNo sign-up to testNo attempts yet
Junior Python screenings are mostly code reading: what does this print, which exception is raised, why did the list change. The test here uses that format, and the result page explains each answer.
Benchmark: 80% is the pass mark here; junior screenings expect you to read short snippets and predict output. Requirements vary by employer.
Lessons
Lists, dicts and loops: the Python you use every dayThe three structures that appear in almost every script and screening question.Lesson 1
Functions, exceptions and filesWriting a function you can reuse, handling errors without hiding them, and reading a file safely.Lesson 2
Slicing and string methods: reading the index rulesHow start, stop and step work on lists and strings, plus the string methods that clean and format text in scripts.Lesson 3
Mutability, copies and comprehensionsWhy two names can point at one list, the mutable default argument trap, and how to write comprehensions that stay readable.Lesson 4
Advertisement
Interview prep
Python basics interview questionsThe questions junior Python candidates hear most, with answers you can say in under a minute.6 questions
Python practical and code-reading questionsShort code snippets interviewers show on screen, with what to say about each.6 questions
Certificate
Free with an accountA PDF with your name, best score and date. Records this site's tests only.
Common questions
What Python level do junior roles test?
Core syntax, lists and dicts, slicing, functions, exceptions and reading files. Frameworks come later in the process, if at all.
Do I need to run code during the test?
No. The questions are code reading. Running the snippets afterwards in a Python shell is a good way to study.
Which Python version?
Python 3. All snippets use current syntax.