#!/usr/bin/python3 # -*- coding: utf-8 -*- from typing import List, Tuple def sequential_search(dlist: List[int], item: int) -> Tuple[bool, int]: pos = 0 found = False while pos < len(dlist) and not found: if dlist[pos] == item: found = True else: pos = pos + 1 return found, pos print(sequential_search([11, 23, 58, 31, 56, 77, 43, 12, 65, 19], 31))