Question: Write a new function, typed_sorted_lists() that takes two lists as arguments. Return the unique items in both lists as separate lists, one only containing a
Write a new function, typed_sorted_lists() that takes two lists as arguments. Return the unique items in both lists as separate lists, one only containing a descending-sorted list of ints (high to low), and the other only containing a descending-sorted list of strings (z to a).
For example,
>>> l1 = [1, 10, 2, 3, 3, 4, 4, 4, 5, 6, 7, 8, 'spam', 'dinsdale', 3.14, 'zara', 'apple'] >>> l2 = [1, 3, 32, 5, 7, 9, 11, 13, 'dinsdale', 'spam', 'fred', 'apple'] >>> type_sorted_lists(l1, l2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
