Fix 'xrange' not available in python3