Copyright © tutorialspoint.com

# Python dictionary len() Function

## Description:

This function gives the total length of the dictionary. This would be equal to the number of items in the dictionary.

## Syntax:

    len(dict)

## Parameters:

Here is the detail of parameters:

- dict: This is the dictionary which length needs to be calculated.

## Example:

    #!/usr/bin/python

    dict = {'Name': 'Zara', 'Age': 7};
    print "Length : %d" % len (dict)

This produces following result:

    Length : 2

Copyright © tutorialspoint.com