Tic Tac Toe by croyal

b='   |   |   \n'
l='---+---+---\n'
B=(b+l)*2+b

def s(t,v,p):
 return t[0:p]+v+t[p+1:]
B=s(B,'X',1)
print B
B=s(B,'O',29)
print B
B=s(B,'X',57)
print B
B=s(B,'O',9)
print B
B=s(B,'X',49)
print B
B=s(B,'O',53)
print B
B=s(B,'X',25)
print B

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page