Advertisement
Guest User

Untitled

a guest
Mar 8th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. gameboard1 = []
  2. gameboard2 = []
  3.  
  4. def make_board(board):
  5. for x in range(5):
  6. board.append(["O"] * 5)
  7.  
  8. make_board(gameboard1)
  9.  
  10. def make_board(*board):
  11. #the goal was to be able to have a function to make multiple boards at once, without having to do it line by line.
  12. #Throws error AttributeError: 'tuple' object has no attribute 'append'
  13. for x in range(5):
  14. board.append(["O"] * 5)
  15.  
  16. make_board(gameboard1, gameboard2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement