Python3 compat for range.