Vidyalelo
Python · Q47

MCQs for Python Strings: Exam

Programming · Python · question 47

Q47

What will be the output of the following Python code snippet? print('abcdefcdghcd'.split('cd'))

A.
['ab', 'ef', 'gh']
B.
['ab', 'ef', 'gh', "]
Answer
C.
('ab', 'ef', 'gh')
D.
('ab', 'ef', 'gh', ")

Answer: Option B

Solution

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