[Tutor] deleting elements of a dictionary
__peter__ at web.de
Fri May 19 05:11:29 EDT 2017
Michael C wrote:
> for n in list(read_dictionary):
>> if read_dictionary[n] == '5':
>> del read_dictionary[n]
> After doing this how do I save it back to the dictionary?
> then i ll do this
> numpy.save('loc_string_dictionary.npy', dictionary)
Hm, the dict is called `read_dictionary`, so you save it with
but I may have understood the question.
If so, please clarify.
More information about the Tutor