Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- ## Given two lists of strings, with duplicates, compare them for equality. Equality means exactly the same elements exist in both lists.
- ## For example:
- ## list_1 = ['a','b','c','c']
- ## list_2 = ['a','c','b','c']
- ## compare_lists(list_1, list_2)
- ## True
- ## Comments on implementation
- ## - Does the function deal with imbalanced list sizes? list_a is 1 element, list_b is 2 elements
- ## - 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