Logo

Programming-Idioms

History of Idiom 172 > diff from v6 to v7

Edit summary for version 7 by gustavotcabral:
New Python implementation by user [gustavotcabral]

Version 6

2018-09-21, 13:03:21

Version 7

2018-09-24, 18:17:34

Idiom #172 Insert entry in map

Insert value v for key k in map m.

Idiom #172 Insert entry in map

Insert value v for key k in map m.

Extra Keywords
associative
Extra Keywords
associative
Code
m[k] = v
Comments bubble
If m[k] already exists, then it is overwritten.
Doc URL
https://docs.python.org/tutorial/datastructures.html#dictionaries