Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 441 Bytes

File metadata and controls

36 lines (28 loc) · 441 Bytes

[] (key lookup)

Description

Returns the value associated with the given key.

Syntax

dict [key]

key
Required. Key which value is to be retrieved.

Return Value

The same as associated with key.

Time Complexity

#TODO

Remarks

If key is not found throws KeyError.

Example

>>> {'a': 1, 'b': 2}['a']
1

See Also

#TODO