gameMap = [['.'] * 5 for _ in xrange(5)] # '.' represents grass.
This should print something along the lines of:
[['.', '.', '.', '.', '.'],
['.', '.', '.', '.', '.'],
['.', '.', '.', '.', '.'],
['.', '.', '.', '.', '.'],
['.', '.', '.', '.', '.']]
I'm looking to replace a specific index of this array using the tracked user position. If the user position is at (0, 0), i.e. userpos = gamemap[0][0], and I replace that index with a 'P' so the first row looked like [['P', '.', '.', '.', '.'],, how would I go about tracking that index's original value of '.' so that when the player moves from 0,0 I could replace the that tile with its first value, which in this case would be '.'?