Python | Functions | Question 2

What is the output of the following code :

L = ['a','b','c','d']
print "".join(L)

(A) Error
(B) None
(C) abcd
(D) [‘a’,’b’,’c’,’d’]

Answer: (C)

Explanation: “” depicts a null string and the join function combines the elements of the list into a string.

Quiz of this Question

My Personal Notes arrow_drop_up

Practice Tags :

Recommended Posts:

0 Average Difficulty : 0/5.0
No votes yet.

User Actions