mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Improve grammar in linear_search docstring (#14081)
* Improve grammar in linear_search docstring Improved wording in the linear search docstring for better clarity. No code logic changed. * Update linear_search.py * Update linear_search.py --------- Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
This commit is contained in:
committed by
GitHub
parent
7af5aba250
commit
9ea690e098
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
This is pure Python implementation of linear search algorithm
|
||||
This is a pure Python implementation of the linear search algorithm.
|
||||
|
||||
For doctests run following command:
|
||||
python3 -m doctest -v linear_search.py
|
||||
@@ -12,8 +12,8 @@ python3 linear_search.py
|
||||
def linear_search(sequence: list, target: int) -> int:
|
||||
"""A pure Python implementation of a linear search algorithm
|
||||
|
||||
:param sequence: a collection with comparable items (as sorted items not required
|
||||
in Linear Search)
|
||||
:param sequence: a collection with comparable items (sorting is not required for
|
||||
linear search)
|
||||
:param target: item value to search
|
||||
:return: index of found item or -1 if item is not found
|
||||
|
||||
|
||||
Reference in New Issue
Block a user