This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_all_key_values(iterable, allow_sub_elements=False): | |
"""Returns an iterator that returns all key value pairs | |
of a (nested) iterable. If allow_subdict set to False, | |
will return only the subvalues, and not the nested dict | |
or list | |
Arguments: | |
- iterable: <list> or <dictionary> | |
- allow_subdict : boolean |