Guest User

Untitled

a guest
Aug 23rd, 2018
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. TEST_DICTIONARIES = [
  2. {
  3. 'name': 'billy',
  4. 'email': 'billy@email.com',
  5. 'purchases': [
  6. 'purchase_id1',
  7. 'purchase_id2'
  8. ]
  9. },
  10. {
  11. 'name': 'bob',
  12. 'email': '2bob@email.com',
  13. 'purchases': [
  14. 'purchase_id3'
  15. ]
  16. },
  17. {
  18. 'name': 'fred',
  19. 'email': 'fred@email.com',
  20. 'purchases': [
  21. 'purchase_id4',
  22. 'purchase_id5',
  23. 'purchase_id6'
  24. ]
  25. }
  26. ]
  27.  
  28. TEST_INTEGER_LIST = [1, 3, 5, 1, 9, 2, 3, 7, 1]
  29.  
  30. ## Problem 1: Write a function that takes a list of dictionaries and a function
  31. ## and returns another list of dictionaries, sorted by the key(s) specified in that function
  32.  
  33. ## Problem 2: Write a function that takes a list of dictionaries, and returns a list
  34. ## of values such that each value in the list is a corresponding value from the corresponding dictionary
  35.  
  36. ## Problem 3: Write a function that takes a list of integers, and returns double the sum of non-duplicate values
  37. ## from the list (For TEST_INTEGER_LIST, this should return 54)
Add Comment
Please, Sign In to add comment