import random import time import execjs if __name__ == '__main__': a = [] for x in range(100): a.append(x) print(a) x = 10 while len(a) != 0: print(str(a[:x]).lstrip("[").rstrip("]")) a = a[x:] print("%d %f" % (1.1, 1.1)) ctx = execjs.compile(""" s = function (t) { var a, i, o = Math.abs(parseInt((new Date).getTime() * Math.random() * 1e4)).toString(), n = 0; for (a = 0; a < o.length; a++) n += parseInt(o[a]); return i = function(t) { return function(a, i) { return 0 >= i - "" + a.length ? a : (t[i] || (t[i] = Array(i + 1).join(0))) + a } }([]), n += o.length, n = i(n, 3 - n.toString().length), t.toString() + o + n } function get_r() { return s(1) } """) print(ctx.call("get_r"))