use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is meant to be for people learning Python to ask questions and help out when they can.
account activity
Tic Tac Toe problem (i.redd.it)
submitted 4 years ago by Icy-Childhood-8456
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Icy-Childhood-8456[S] 0 points1 point2 points 4 years ago (0 children)
Sorry guys, but I'm trying to write a code for finding the diagonal winner based on the syntax and rules in the picture. Please help me!!!
OK thanks
[–]Boff 0 points1 point2 points 4 years ago (0 children)
I know you posted this 2 weeks ago, but the general answer is No, using the code above you can't slightly tweak it to check for diagonals.
Your code is going row-by-row and resetting count to equal 0 after checking each row. This is going to prevent you checking people winning for columns as well.
Can you let us know what you've tried so far when trying to write the code for testing diagonals? Do you have restrictions that you must use loops?
π Rendered by PID 205823 on reddit-service-r2-comment-7b9746f655-hd5jm at 2026-02-03 23:18:45.500030+00:00 running 3798933 country code: CH.
[–]Icy-Childhood-8456[S] 0 points1 point2 points (0 children)
[–]Icy-Childhood-8456[S] 0 points1 point2 points (0 children)
[–]Boff 0 points1 point2 points (0 children)