searching and sorting the linear search the simplest solution to the sequence search problem is the sequential or linear search algorithm this technique iterates over the sequenceone item at timeuntil the specific item is found or all items have been examined in pythona target item can be found in sequence using the in operatorif key in thearray print"the key is in the array else print"the key is not in the array the use of the in operator makes our code simple and easy to read but it hides the inner workings underneaththe in operator is implemented as linear search consider the unsorted - array of integer values shown in figure (ato determine if value is in the arraythe search begins with the value in the first element since the first element does not contain the target valuethe next element in sequential order is compared to value this process is repeated until the item is found in the sixth position what if the item is not in the arrayfor examplesuppose we want to search for value in the sample array the search begins at the first entry as beforebut this time every item in the array is compared to the target value it cannot be determined that the value is not in the sequence until the entire array has been traversedas illustrated in figure ( (asearching for start (bsearching for start figure performing linear search on an unsorted array(athe target item is found and (bthe item is not in the array finding specific item the function in listing implements the sequential search algorithmwhich results in boolean value indicating success or failure of the search this is the same operation performed by the python in operator count-controlled loop is used to traverse through the sequence during which each element is compared against the target value if the item is in the sequencethe loop is terminated and true is returned otherwisea full traversal is performed and false is returned after the loop terminates