If the my_dict
variable is global, you can't do:
my_dict = {}
that just create a new reference in the local scope.
Also, I found disgusting using the global
keyword, so how can I empty a dict using its methods?
Use the clear()
method?
Documentation - (docs.python.org)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With