adplus-dvertising
frame-decoration

Question

What is the output of the following code?
nums = set([1,1,2,3,3,3,4,4])
print(len(nums))

a.

7

b.

Error, invalid syntax for formation of set

c.

4

d.

8

Posted under Python

Answer: (c).4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following code?