Examveda

What will be the output of the following Python function?
{x for x in 'abc'}
{x*3 for x in 'abc'}

A. {abc}
aaa
bbb
ccc

B. abc
abc abc abc

C. {‘a’, ‘b’, ‘c’}
{‘aaa’, ‘bbb’, ‘ccc’}

D. {‘a’, ‘b’, ‘c’}
abc
abc
abc

Answer: Option C


This Question Belongs to Python Program >> Sets In Python

Join The Discussion

Related Questions on Sets in Python