How To Get All Values With The Same Key In An Immut. Dict?
ImmutableMultiDict([('course', u'2132'), ('course', u'2121'), ('myc', u''), ('ok', u'Add to my plan')]) is the dict I get in my WSGI-Code written in Python. Now I want to get all
Solution 1:
You can use getlist
method, like this
immutable_dict_obj.getlist("course")
This will return a list of values corresponding to the key course
.
Post a Comment for "How To Get All Values With The Same Key In An Immut. Dict?"