## Linear (Sequential) Search and Its Usage in python

#### Linear (Sequential) Search and Its Usage in python

Problem: Explain the concept of a linear (sequential) search in computer science. Provide an example of how to perform a linear search in Python and discuss its usage and limitations.
Solution:A linear search, also known as a sequential search, is a simple algorithm used to find a specific element in a list or array by iterating through the elements one by one until the target element is found or until the entire list is exhausted.
##### Here's an example of how to perform a linear search in Python:
Represents whole numbers (positive, negative, or zero).
```def linear_search(arr, target) :
for i, element in enumerate(arr) :
if element == target:
return i # Return the index of the target if found

# Example usage:

my_list = [10, 25, 4 , 8 , 30, 15]
target_element = 8
result = linear_search(my_list, target_element)

if result != -1 :
print(f" Element {target_element} found at index {result} . " )
else: