![]() ![]() The source of your confusion probably comes from the fact that, when iterating over a python dict using a for loop, the variable (in this case y) would in fact be the dictionary key. When iterating over a list, the value of y is not the index of the the item in your board list, it is the value of each item. The misunderstanding is in your for loop. It's even easier than what you are doing. I just want to know what the mistake I've made is so I can learn from it.) Thank you very much! (also please don't try to make it shorter or run faster. Also take note I'm only in comp prog 1 and am at a very basic level, so simplicity would be best. If anyone knows how to get this to work the way I want that would be great. I thought this would work but I get TypeError: list indices must be integers or slices, not str refering to my if board = ' ': line. but if there is no ' ' it returns true meaning the board is full (I put the print functions in just for my sake while I was trying to fix the darn thing.) What I want it to do is search each item in the list and when it finds a ' ' or space, it returns false and breaks the loop. """Returns a boolean value reporting the state of the board, full or not. For more Roblox Music codes and Brookhaven RP Music ID Codes, keep reading our articles on Gamer Tweak.I'm trying to build a tic tac toe game and I'm having trouble with making a working function to check if the board is full. So, go ahead and use the music ID of your favorite TikTok song in Roblox and have a listening party! Sing along and have fun. ![]() Check out the song name, artist name, and the working TikTok music codes (song IDs) that will help you play the latest hits. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |