Python exercise: minesweeping