Python Programming Interview Questions
Python Language History, Basics & Program Structure
Fill in the blanks
Python is a high-level, ______________ programming language that is typically executed by an interpreter.
Show answer
Answer: interpreted
The creator of Python is ________________________.
Show answer
Answer: Guido van Rossum
Python was first released in ________.
Show answer
Answer: 1991
In Python, code blocks are grouped using ______________ instead of curly braces.
Show answer
Answer: indentation
The reference implementation of Python written in C is called ________.
Show answer
Answer: CPython
PEP stands for Python ______________ Proposal.
Show answer
Answer: Enhancement
The widely used document that describes Python style is PEP ________.
Show answer
Answer: 8
After typing import ________ in the interpreter, you can see the Zen of Python.
Show answer
Answer: this
The standard tool for installing third-party packages from PyPI is ________.
Show answer
Answer: pip
In Python 3, print is a ______________; in Python 2 it was a statement.
Show answer
Answer: function
A single Python source file is usually called a ________.
Show answer
Answer: module
A directory of modules that forms a namespace is called a ________.
Show answer
Answer: package
Python’s automatic reclaiming of unused memory is done by ________________________________________.
Show answer
Answer: garbage collection (the garbage collector)
When a script is run directly, __name__ equals the string ______________.
Show answer
Answer: "__main__"
List literals are written with ______________ brackets.
Show answer
Answer: square