Python
Menu
Menu
Sunday, 8 April 2018
Python dictionary clear
dictionary.clear() method removes all items from the dictionary.
Example
:
dic={
1
:
"one"
,
2
:
"two"
}
print
(dic) dic.clear() output: dic ={}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment