Python (Coding) Quiz
Python syntax, standard-library usage, and the language idioms that come up in day-to-day scripting and application work.
This category currently has 187 questions in the SERVBG quiz bank. Below are a few sample questions: the full interactive quiz shuffles through the whole set with instant scoring.
Sample questions
Which keyword defines a function in Python?
- fn
- define
- def
- func
- function
What does <code>len([1,2,3])</code> return?
- 3
- 2
- 4
- [1,2,3]
- TypeError
Which built-in returns immutable ordered sequence?
- set
- frozendict
- list
- array
- tuple
How do you start a single-line comment?
- /*
- #
- ;;
- --
- //
Which type is unordered with unique elements?
- frozenlist
- dict
- tuple
- set
- list
Related categories
JavaScript (Coding)
Core JavaScript language behavior, async patterns, and the quirks that trip up both beginners and experienced developers.
Linux
Linux command-line usage, file permissions, process management, and the everyday admin tasks every sysadmin and developer needs.
Security
General information security concepts: threats, defenses, and the fundamentals every IT professional should know.
Hardware
Computer hardware components, how they interact, and the troubleshooting knowledge behind keeping systems running.
Networking
TCP/IP fundamentals, routing, protocols, and the networking concepts behind how systems talk to each other.