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 264 views
1 answer 302 views
302 views asked Dec 9, 2020 by avibootz
1 answer 262 views
262 views asked Jul 22, 2020 by avibootz
1 answer 311 views
1 answer 233 views
...