Check sibling questions
Computer Science - Class 12
Chapter 14 - Functions in python

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).

Are ads bothering you?

CA Maninder Singh's photo - Expert in Practical Accounts, Taxation and Efiling

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.