Examveda

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

A. [‘ab’, ‘cd’, ‘ef’]

B. [‘ab\n’, ‘cd\n’, ‘ef\n’]

C. [‘ab\n’, ‘cd\n’, ‘ef’]

D. [‘ab’, ‘cd’, ‘ef\n’]

Answer: Option A


This Question Belongs to Python Program >> Strings In Python

Join The Discussion

Related Questions on Strings in Python