data = [[1,0,0], [1,2,0], [1,0,2]]
row = 0
taken = []
gameround = 0
invalidusage = ""
invalidrange = ""
while gameround < 9:
rowchoice = int(input("Pick a row between 1 and 3 - "))
columnchoice = int(input("Pick a column between 1 and 3 - "))
chosensquare = (rowchoice + columnchoice)
taken.append(chosensquare)
count = taken.count(chosensquare)
if count > 0 and gameround > 0:
invalidusage = "yes"
if chosensquare > 3 or chosensquare < 1:
invalidrange = "yes"
while invalidusage == "yes" and invalidrange == "yes":
print("invalid")
rowchoice = int(input("Pick a row between 1 and 3 - "))
columnchoice = int(input("Pick a column between 1 and 3 - "))
chosensquare = (rowchoice + columnchoice)
taken.append(chosensquare)
count = taken.count(chosensquare)
if count > 0 and gameround > 0:
invalidusage = "yes"
if chosensquare > 3 or chosensquare < 1:
invalidrange = "yes"
while row < 3:
col = 0
temp = ""
while col < 3:
if data[row][col] == 0: temp = temp + " "
elif data[row][col] == 1: temp = temp + "X"
else: temp = temp + "o"
col = col + 1
print(temp)
gameround = gameround + 1
row = row + 1
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}