Q. What is the output of tuple(‘abc’)?

A
'abc'
B
('a', 'b', 'c')
C
['a', 'b', 'c']
D
Error
Solution:

tuple(‘abc’) converts each character to a tuple element, resulting in (‘a’, ‘b’, ‘c’).

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!