d = set( [ 0, 0, 1, 2, 2, 3, 4] )
What is the value of len(d) ?
Explanation
Since set datatype holds only unique values, all the duplicates will be removed from d, so it will become:
set([0, 1, 2, 3, 4])
meaning that its length is equal to 5

@keithroby876 ;)

2017 Dec 5, 3:05:36 PM

Awesome

2017 Nov 30, 12:48:45 PM

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
Python quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes