diff --git a/sorts/gnome_sort.py b/sorts/gnome_sort.py index ea96e0a926a3..3002bc6a8b18 100644 --- a/sorts/gnome_sort.py +++ b/sorts/gnome_sort.py @@ -51,6 +51,9 @@ def gnome_sort(lst: list) -> list: if __name__ == "__main__": + import doctest + + doctest.testmod() user_input = input("Enter numbers separated by a comma:\n").strip() unsorted = [int(item) for item in user_input.split(",")] print(gnome_sort(unsorted))