Use "for i in filter(lambda x:x!=404,range(1,1163)):"