Learn Python
Python is used for scripting, web backends, automation and data science. These quizzes move from syntax and data types to functions, collections and the language features interviewers like to probe.
Written against Python 3.10+.
What you will practise
- Reading and predicting Python code
- Writing functions with sensible defaults
- Choosing between lists, tuples, sets and dicts
- Generators, decorators and context managers
Roadmap
Work through the levels in order, or jump to where you are.
Basic
Functions & control flow
- Loops
- Function arguments
- Scope
Quiz for this level coming soon.
Intermediate
Data structures
- Lists and tuples
- Dictionaries and sets
- Comprehensions
Python quizzes
- PythonBeginner
Python Basics
Types, operators and strings
OperatorsVariablesStrings7 Qs~5mStart - PythonIntermediate
Lists, Tuples, Sets & Dicts
Choosing and using built-in collections
SetsListsDictionaries7 Qs~5mStart - PythonIntermediate
Python Functions
Arguments, scope and closures
Default argumentsArgumentsScope7 Qs~5mStart - PythonAdvanced
Advanced Python
Generators, decorators and class attributes
GeneratorsDecoratorsFile handling7 Qs~5mStart - PythonExpert
Python Interview Questions
Concurrency, copying, dataclasses and idioms
ConcurrencyIdentityMethods7 Qs~5mStart
Interactive Python challenges
Hands-on activities: find bugs, complete code, order steps and match concepts.
Python articles
Python Quiz Preparation: A Practical Guide to Python MCQs
How Python multiple-choice questions are usually built, the traps that catch most learners, and a study routine that uses practice and exam-mode quizzes effectively.
Python Functions Explained: Arguments, Scope and Common Traps
A practical tour of how Python functions receive arguments, resolve variable names and hold on to state, with the mistakes that catch most learners.
FAQ
Which Python version do the quizzes assume?
Python 3.10 or newer. Where behaviour differs between versions, the explanation says so.
I am new to programming. Where should I start?
Start with Python Basics, then move to Functions and Collections.
Are these quizzes good for Data Science interviews?
Yes. Understanding how lists, tuples, and dictionaries work under the hood is critical for data science roles. The advanced quizzes cover list comprehensions and generator expressions.
Is Python pass-by-value or pass-by-reference?
Python uses "pass-by-object-reference". Our advanced quizzes have specific questions explaining what happens when you mutate a list inside a function vs reassigning it.
Do you cover popular libraries like Pandas or NumPy?
Currently, these quizzes focus strictly on the Python standard library and language fundamentals. Library-specific quizzes are planned for the AI & Data category.