diff --git a/sorts/gnome_sort.py b/sorts/gnome_sort.py index ea96e0a926a3..b3f3f53adbf8 100644 --- a/sorts/gnome_sort.py +++ b/sorts/gnome_sort.py @@ -51,6 +51,10 @@ def gnome_sort(lst: list) -> list: if __name__ == "__main__": + from doctest import testmod + + 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))