Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
In the code given below we pass given dictionary as an argument to a python function and then call the function which works on the keys/value pairs and gives the result accordingly
d = {'a' : 1, 'b' : 2, 'c' : 3}
def f(dict):
for k, v in dict.iteritems():
print k, 2*v
f(d)