m = input(\'Num1:\')
m = int(m)
x1 = (m-1)
#
m = input(\'Num2:\')
m = int(m)
x2 = (m-1)
#
z = [0,0,0,0,0,0,0,0,0]
z[(x1)] = 1
z[(x2)] = 1
###############################
The problem is in your MySQL Insert script. You can update this as shown below.
conn.execute("INSERT INTO bola(n01, n02, n03, n04, n05, n06, n07, n08, n09) VALUES(%s,%s,%s,%s,%s,%s,%s,%s,%s)",tuple(data))
Your values count should always match the number of columns.
Here the data
is a list
object.