Question: Implement a couple of python functions specified in the given skeleton script. def test_list_2_dict(): # provide your test cases pass def list_2_dict(my_list): This function taks

Implement a couple of python functions specified in the given skeleton script.

Implement a couple of python functions specified in the given skeleton script.

def test_list_2_dict():

# provide your test cases

pass

def list_2_dict(my_list): This function taks as input a list of 2-tuples and and convert the list to a dictionary. The formart of the list is: [(k1, v1), (k2, v2), (k3, v3)] and the output is {k1:v1, K2:v2, k3:v3} For example, a test case would be: [(11, 'David'), (101, 'John'), (32, 'Lisa'), (55, 'Chris')] return my_dict

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 Databases Questions!