From 3fe4528543a6433f5e17fdb52debeb940f9d1a31 Mon Sep 17 00:00:00 2001 From: Almas Bekbayev <121730304+bekbayev@users.noreply.github.com> Date: Wed, 12 Apr 2023 12:38:55 +0600 Subject: [PATCH] Fix linear_search docstring return value --- searches/linear_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searches/linear_search.py b/searches/linear_search.py index 777080d14e36..ba6e81d6bae4 100644 --- a/searches/linear_search.py +++ b/searches/linear_search.py @@ -15,7 +15,7 @@ def linear_search(sequence: list, target: int) -> int: :param sequence: a collection with comparable items (as sorted items not required in Linear Search) :param target: item value to search - :return: index of found item or None if item is not found + :return: index of found item or -1 if item is not found Examples: >>> linear_search([0, 5, 7, 10, 15], 0)