Python Programming - Functions
Exercise : Functions - General Questions
- Functions - General Questions
51.
How does the
zip
function work?
Answer: Option
Explanation:
The
zip
function in Python combines two or more iterables element-wise into tuples.
52.
What is the purpose of the
filter
function?
Answer: Option
Explanation:
The
filter
function in Python is used to filter elements from an iterable based on a specified condition.
53.
What is the purpose of the
staticmethod
decorator?
Answer: Option
Explanation:
The
staticmethod
decorator in Python is used to create static methods that can be called on class instances.
54.
What does the
__annotations__
attribute indicate?
Answer: Option
Explanation:
The
__annotations__
attribute in Python contains the annotations of a function's parameters.
55.
What is the purpose of the
bytecode
?
Answer: Option
Explanation:
The
bytecode
in Python represents the compiled form of a Python program, which is an intermediate code executed by the Python interpreter.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers