Home » Programming Language (coding) » Python MCQ » What will be the output of the following Python code? nums = set([1,1,2,3,3,3,4,4]) print(len(nums))

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

What will be the output of the following Python 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

Correct Answer: Option C.

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve : *
24 × 23 =