How to clear (empty) a dictionary dictionary

1 Answer

0 votes
dic = {'a': 'python', 'b': 'java', 'c': 'php', 'd': "c++"}

dic.clear()

print(dic)


'''
run:

{}

'''

 



answered Dec 5, 2017 by avibootz

Related questions

1 answer 255 views
1 answer 295 views
295 views asked Dec 9, 2020 by avibootz
1 answer 256 views
256 views asked Jul 22, 2020 by avibootz
1 answer 307 views
1 answer 226 views
...