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 179 views
1 answer 204 views
204 views asked Dec 9, 2020 by avibootz
1 answer 170 views
170 views asked Jul 22, 2020 by avibootz
1 answer 213 views
1 answer 144 views
...