Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TEST_DICTIONARIES = [
- {
- 'name': 'billy',
- 'email': 'billy@email.com',
- 'purchases': [
- 'purchase_id1',
- 'purchase_id2'
- ]
- },
- {
- 'name': 'bob',
- 'email': '2bob@email.com',
- 'purchases': [
- 'purchase_id3'
- ]
- },
- {
- 'name': 'fred',
- 'email': 'fred@email.com',
- 'purchases': [
- 'purchase_id4',
- 'purchase_id5',
- 'purchase_id6'
- ]
- }
- ]
- TEST_INTEGER_LIST = [1, 3, 5, 1, 9, 2, 3, 7, 1]
- ## Problem 1: Write a function that takes a list of dictionaries and a function
- ## and returns another list of dictionaries, sorted by the key(s) specified in that function
- ## Problem 2: Write a function that takes a list of dictionaries, and returns a list
- ## of values such that each value in the list is a corresponding value from the corresponding dictionary
- ## Problem 3: Write a function that takes a list of integers, and returns double the sum of non-duplicate values
- ## from the list (For TEST_INTEGER_LIST, this should return 54)
Add Comment
Please, Sign In to add comment