Use xrange instead of range
Make code shorter