1. List and dictionary objects are an extremely important part of nearly all Python applications so it would be useful to learn how to manipulate those objects from C. Add another function to the foo module called dict2list that accepts a dictionary as a parameter and returns a list. The members of the list should alternate between the keys and the values in the dictionary. The
order isn’t important as long as each key is followed by its value. You’ll have to look up how to iterate over the items in the dictionary (hint:look up PyDict_Next) and how to create a list and append items to it (hint: look up PyList_New and PyList_Append).
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here