Python List - len function

Method Name:
len(set_in)

Method Overview:

The len() method returns the number of elements present in the set.
The number of elements present in the set is called as the cardinality of the set.


Parameters:

set_in: The set for which the length needs to be found.  

Return Value:

The number of elements present in the set otherwise known as cardinality of a set.

 

>>> EMWaves = {"Radio waves","Micro waves","Infrared waves","Visible light","Ultraviolet waves","X-ray","Gamma rays"}

>>> len(EMWaves)

7


Copyright 2024 © pythontic.com