L indicates that this is a long integer, it behaves as normal integer so you don't need to worry about that, use int() if it annoys you, >>> i = 1410L >>> i 1410L >>> print i 1410 >>> int(i) 1410 >>> 'insert into a (b) values (%s)' % i 'insert into a (b) values (1410)' -- bromden[at]gazeta.pl