A Swiss Re risk-processing component receives record identifiers in an unsorted list. Implement a linear search that returns the index of the first occurrence of a target identifier, or -1 if the identifier is not present.
Write a function that accepts:
records, a list of integers representing record identifiers.target, an integer identifier to find.Return an integer index. The index must be the position of the first element in records equal to target. Return -1 when no element matches. The list is not sorted, so the function must inspect elements from left to right.
def linear_search(records, target):