Vidyalelo
Python · Q150

MCQs for Python Strings: Exam

Programming · Python · question 150

Q150

What will be the output of the following Python code snippet? print('ab '.splitlines())

A.
[‘ab’, ‘cd’, ‘ef’]
Answer
B.
[‘ab\n’, ‘cd\n’, ‘ef\n’]
C.
[‘ab\n’, ‘cd\n’, ‘ef’]
D.
[‘ab’, ‘cd’, ‘ef\n’]

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board