instead 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: as opposed to for i in range(8): note you save yet another character by omitting the space before `[` if 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] 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 edit: saving 1 more character, 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 you only need to use it once: for i in 1,*8:pass # this is invalid syntax