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