Question: Write a function called odd even(di) that takes a dictionary with integers as keys and values as an argument. The function should return a new

Write a function called odd even(di) that takes a dictionary with integers as keys and values as an argument. The function should return a new dictionary that contains the key-value pairs of di with odd keys and even values. For example, if di is the following dictionary, {3 : 4, 2 : 6, 10 : 1, 9 :-2,-2 :-5, 7 : 9} the function should return {3 : 4, 9 :-2}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!