Fix skipHours for Python 3

The xrange function isn’t available in Python 3. The range function
however is doing the same job and is working for both Python 2 and
Python 3.