Python3 compatible xrange rather than range, raise syntax