May 2017
Intermediate to advanced
280 pages
6h 2m
English
The syntax of clear() is as follows:
dict.clear()
Let's consider the following example:
>>> dict1={1:'one',2:'two',3:'three'} >>> dict1 {1: 'one', 2: 'two', 3: 'three'} >>> dict1.clear() >>> dict1 {} >>>
Read now
Unlock full access