For a small project battleship py3.5:
def maingame_sp():
global board
board = [['.' for i in range (0,10)] \
for j in range (0,10)]
def coordinates(board):
x_ax = input(str("Give coordinate x"))
y_ax = input(int("Give coordinate y"))
I am trying to build a version of battleship where I can input coordinates like A1 to the board and replacing the "." with a marker for misses and hits.
Can anyone give me a little help on how to access multiple lists inside a lists generated by the forloop range to replace an item using the input x- and y-axis?
AinA1part of the x or the y-axis?x_axandy_axas in your code, or likeA1as in your text?