Update list-1.py

more compact version of the sum2(nums) method