Examveda

Is the following Python code valid?
a={3,4,{7,5}}
print(a[2][0])

A. Yes, 7 is printed

B. Error, elements of a set can't be printed

C. Error, subsets aren't allowed

D. Yes, {7,5} is printed

Answer: Option C


This Question Belongs to Python Program >> Sets In Python

Join The Discussion

Related Questions on Sets in Python