Examveda

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

A. ['ab', 'ef', 'gh']

B. ['ab', 'ef', 'gh', "]

C. ('ab', 'ef', 'gh')

D. ('ab', 'ef', 'gh', ")

Answer: Option B


This Question Belongs to Python Program >> Strings In Python

Join The Discussion

Related Questions on Strings in Python