len

Returns the number of items in a dict.

This function does not generate a change.

Function

dict.len()

Arguments

None

Return value

Returns the number of items in a dict.

Example

This code uses len() to return the number of items in a dict:

dict([
    [0, 'item 0'],
    [1, 'item 1'],
]).len();

Return value in JSON format

2