use xrange instead of range