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 266 views
1 answer 303 views
303 views asked Dec 9, 2020 by avibootz
1 answer 263 views
263 views asked Jul 22, 2020 by avibootz
1 answer 312 views
1 answer 234 views
...