5
bit.man
9
79/ 145
Last seen 8 years ago
Member for 9 years, 10 months, 11 days
Difficulty Normal
Best reviews / Newest reviews
First-preechaim 1
This is a very elegant solution, I like it! My attempt at this problem was too complicated. One thing you could do to make it better is just check the letters once, instead of looping over all the text. Then you don't need to check if they are alpha() and your code will run much faster for long t More
First-veky 1 1
This is really clever code. I like how you call checkio to build your string and remove the white spaces with the strip() method. I had trouble with the white spaces and had to add extra if statements. It is a good way to build a dictionary with the enumerate function. It was a good idea to check if More
First-Renelvon
Nice work. These string methods make it simple. More
Second-gyahun_dash 1
Your code is awesome. What does the * do in the zip function args? I have seen it used for variable length arguments but not sure how it works here. More
First-Dirk
I like your solution - it is easier to read if you wrap the lines. Nice work. def checkio(game_result): for i in range(3): #check for a row X or O if((game_result[i][0] in ['O', 'X']) and (game_result[i][0] == game_result[i][1] == game_result[i][2])): More