Skip to content

Instantly share code, notes, and snippets.

@izikeros
Last active January 13, 2022 08:07
Show Gist options
  • Select an option

  • Save izikeros/106416fa03f28e9bbf6283b9bd2d912b to your computer and use it in GitHub Desktop.

Select an option

Save izikeros/106416fa03f28e9bbf6283b9bd2d912b to your computer and use it in GitHub Desktop.
Check if two lists are equal. Used in assertions in tests
def check_lists_equal(list_1: list, list_2: list) -> bool:
"""Check if two lists are equal."""
return len(list_1) == len(list_2) and sorted(list_1) == sorted(list_2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment