Vidyalelo
Python · Q57

Python Sets MCQs: Exam

Programming · Python · question 57

Q57

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’}
Answer
D.
{‘a’, ‘b’, ‘c’}
abc
abc
abc

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board