Open In App

Python | Functions | Question 2

Like Article
Like
Save Article
Save
Share
Report issue
Report

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


Last Updated : 05 Nov, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads