Examveda

What will be the output of the following Python code?
s="a@b@c@d"
a=list(s.partition("@"))
print(a)
b=list(s.split("@",3))
print(b)

A. [‘a’,’b’,’c’,’d’]
[‘a’,’b’,’c’,’d’]

B. [‘a’,’@’,’b’,’@’,’c’,’@’,’d’]
[‘a’,’b’,’c’,’d’]

C. [‘a’,’@’,’b@c@d’]
[‘a’,’b’,’c’,’d’]

D. [‘a’,’@’,’b@c@d’]
[‘a’,’@’,’b’,’@’,’c’,’@’,’d’]

Answer: Option C


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python