Logo

Programming-Idioms

History of Idiom 170 > diff from v3 to v4

Edit summary for version 4 by bukzor:
New Python implementation by user [bukzor]

Version 3

2018-04-06, 20:02:24

Version 4

2018-04-08, 07:21:23

Idiom #170 Get map size

Set n to the number of elements stored in mymap.

This is not always equal to the map capacity.

Idiom #170 Get map size

Set n to the number of elements stored in mymap.

This is not always equal to the map capacity.

Code
n = len(mymap)