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 175 views
1 answer 202 views
202 views asked Dec 9, 2020 by avibootz
1 answer 166 views
166 views asked Jul 22, 2020 by avibootz
1 answer 210 views
1 answer 142 views
...