The syntax of the sum() function is:
The sum() function adds start and items of the given iterable from left to right.
sum() returns the sum of start and items of the given iterable.
numbers = [2.5, 3, 4, -5]
# start parameter is not provided
numbers_sum = sum(numbers)
# start = 10
numbers_sum = sum(numbers, 10)
If you need to add floating-point numbers with exact precision, then you should use
If you need to concatenate items of the given iterable (items must be strings), then you can use the
Visit this page to learn about, Python join()