What will be the output of the following code?
L = ['a','b','c','d']
print ("".join(L))
(a) Error
(b) a b c d
(c) [‘a’,’b’,’c’,’d’]
(d) None
Answer:
The join( ) function joins all items in a list or tuple into a single string.
So, the output of the given code will be ‘ abcd’.
So, the correct answer is (b).