P.198 Ex.12

  1. Write a function sumList(nums), where nums is a list of numbers.
  2. Return the sum of the numbers in the list.
  3. Test sumList() with the following main program:
    
    def main():
        print( sumList([1,2,3,4]) )
        print( sumList( range(101) ) )
    
    main()