RSSAmplifier

Graham Lyons · May 21, 2013

How to call a function on each value in a Python dictionary

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Python has great support for mapping over lists or tuples, creating new structures containing the results of calling a function on the members of the original. I was looking for something similar for the values in a dictionary, maintaining the original keys, and I didn’t find it described anywhere.

Read on /article/how-to-call-a-function-on-each-value-in-a-python-dictionary

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.