Write a simple program named sum.py
, that takes in an arbitrary-size list of input floats from the command-line, and prints out the sum of them on the terminal with the following message,
$ python sum.py 1 2 1 23
The sum of 1 2 1 23 is 27.0
Note: You will need to use Python’s built-in function sum()
.