>>> print x
[(1,), (2,), (3,), (4,), (5,), (6,), (7,), (8,), (9,), (10,)]
>>> for i in range(10):
... if len(x)>0:
... m = random.choice(x)
... x.remove(m)
... y = "%s" %m
... z = int(y)
... cur.execute("""UPDATE accounts SET column = 'YES' WHERE userid = %s""", (z, ))
This doesn't do anything though. When I view the accounts table, nothing's changed.