list:
board = []
for i in range(0,5):
board_list = ["o"] * 5
board.append(board_list)
print str(board).upper()
Problem here how can I make it so that I can lower or upper this in Python 3.x? If I were to do the normal way without using a list or a dictionary it would be :
board = ("adsfdsfsd")
print board.upper()
So I want to know how I need to proceed in order to be able to solve this, and have the letters be showing the letter o uppercase like this:
[['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O'], ['O', 'O', 'O', 'O', 'O']]
instead of it lowercased like this:
[['o', 'o', 'o', 'o', 'o'], ['o', 'o', 'o', 'o', 'o'], ['o', 'o', 'o', 'o', 'o'], ['o', 'o', 'o', 'o', 'o'], ['o', 'o', 'o', 'o', 'o']]
@Kevin: so the error that appears is the following:
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
TypeError: 'dict' object is not callable
@Kevin: ideone to debug: http://ideone.com/VFUWfs
I'm using this site between to test code: http://labs.codecademy.com/#:workspace since I'm doing the course over there