def linear_search(arr, x):
    """
    Performs a linear search
    :param arr: Iterable of elements
    :param x: Element to search for
    :return: Index if element found else None
    """
    l = len(arr)
    for i in range(l):
        if arr[i] == x:
            return i
    return None