Python program to find the sum of all numbers in a list
You can find the sum of all numbers in a list in Python using the `sum()` function. Here's a simple Python program to achieve that:
```python
def sum_of_numbers(numbers):
# Using the sum() function to find the sum of all numbers in the list
return sum(numbers)
# Example usage:
my_list = [10, 20, 30, 40, 50]
total_sum = sum_of_numbers(my_list)
print("The sum of all numbers in the list is:", total_sum)
```
This program defines a function `sum_of_numbers` that takes a list of numbers as input and returns the sum of all numbers using the `sum()` function. Then, it calls this function with an example list `my_list` and prints the total sum.