def random_bombs(self):
        "returns list of coordinates in tuple form"
        from random import choice
        coords = []
        for i in range(self['BOMBS']):
            while 1:
                row_idx = choice(range(self['ROWS']))
                col_idx = choice(range(self['COLS']))
                if not (row_idx,col_idx) in coords:
                    break
            coords.append((row_idx,col_idx))
        return coords
returns list of coordinates in tuple form
recipes/Python/101853_Use_tryexcept_handle_unexpected_input/recipe-101853.py