mysql - python sql fetchone without poping it off. -
how can use python fetchone() call without removing list.
if do:
while true: print cur.fetchone()
where each line next row.
how can like
cur.fetchone(pop=false) # doesnt remove list im testing , fetch row later.
basically. need fetch row. check in it. if matches, pop if off list , stuff row. otherwise. move on.
you can't. store return value first:
while true: result = cur.fetchone() if result not none: # something.
Comments
Post a Comment