From 315a16f520c1608d265e73a336600bf731b79030 Mon Sep 17 00:00:00 2001 From: Sarah Luiz Date: Wed, 23 Oct 2019 00:01:26 -0300 Subject: [PATCH] Add Linear Search in Python --- Python/LinearSearch.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Python/LinearSearch.py diff --git a/Python/LinearSearch.py b/Python/LinearSearch.py new file mode 100644 index 0000000..520308d --- /dev/null +++ b/Python/LinearSearch.py @@ -0,0 +1,6 @@ +def LinearSearch(arr, val): + for i in range(len(arr)): + if arr[i] == val: + return True + + return False \ No newline at end of file