The set len is one of the set method, which is used to find the length of a set (total number of items). In this article, we will show you, How to use this Python len set function with practical examples.

**TIP: **Please refer sets article to understand everything about Sets.

## Python set len syntax

The basic syntax behind this Len function is:

len(set_Name)

### Python set Len Example

The set len function helps you to find the set length or find the total number of items in a given set.

First, we declared an empty set, and finding its length. Next, we declared a numeric set, and find its length using this len function.

# Python set len method emptySet = {} print("\nOld Set Items = ", emptySet) # Python Set length print("Length of a Set = ", len(emptySet)) myIntSet = {15, 25, 35, 45, 55} print("\nOld Set Items = ", myIntSet) # Python Set length print("Length of a Set = ", len(myIntSet))

**OUTPUT**

Thank You for Visiting Our Blog