Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. ## Given two lists of strings, with duplicates, compare them for equality. Equality means exactly the same elements exist in both lists.
  4. ## For example:
  5. ## list_1 = ['a','b','c','c']
  6. ## list_2 = ['a','c','b','c']
  7. ## compare_lists(list_1, list_2)
  8. ## True
  9.  
  10. ## Comments on implementation
  11. ## - Does the function deal with imbalanced list sizes? list_a is 1 element, list_b is 2 elements
  12. ## - Does the function deal with duplicates? It's possible to implement, but to have it not correctly detect duplicates. For example if a list has 3 A's -vs- 2 A's.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement