Home ยป Programming Language (coding) ยป Python MCQs ยป 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.

Take Part in Discussion:

Your email address will not be published.

Solve : *
26 − 3 =