Hello I'm working on printing a grid of any size and labeling it numerically or alphabetically I have the code that creates the grid, but I have no idea how I would label it... Here is the code that crates the grid:
def grid():
y = 5 #int(raw_input("How tall do you want the grid to be?" "(type a to exit)"))
x = 5 #int(raw_input("How long do you want the grid to be?"))
a = ''' _____z
| |w
|____|xy'''
for i in range(y-1):
a = a.replace('''y''','''
| |w
|____|xy''')
for j in range(x-1):
a = a.replace('''x''','''____|x''')
a = a.replace('''w''',''' |w''')
a = a.replace('''z''','''_____z''')
a = a.replace('''x''','''''')
a = a.replace('''y''','''''')
a = a.replace('''_z''','''''')
a = a.replace('''w''','''''')
print a
grid()
Any help is appreciated. Thanks!