insteadInstead of range(x), you can use the ** operator on a list of anything, if you don't actually need to use the value of i:
for i in[1]*8:pass as opposed to
for i in range(8):pass note you save yet another character by omitting the space before [
ifIf you need to do this more than twice, you could assign any iterable to a variable, and multiply that variable by the range you want:
r=[1]r=1, for i in r*8:pass for i in r*1000:pass as opposed to:
r=range for i in r(8):pass for i in r(1000):pass editNote: saving 1 more characterthis is often longer than exec"pass;"*8, you can use tuple notation instead of a character or list:
r=1, for i in r*8:pass but that won't work if youso this trick should only need to use it once:be used when that isn't an option.
for i in 1,*8:pass # this is invalid syntax