A function in Python can return:
-
A
Only integers
-
B
Any type
Correct answer
-
C
Only strings
-
D
Only floats
Correct answer
B. Any type
10 views
Explanation
A function can return any type: integer, string, list, or even another function. If no return is specified, it returns None.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ