No need to use 0 as the first argument, it is the default:

    range(len(nums))