Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Summing Values the Pythonic Way With sum() (Summary)

You can now use Python’s built-in function sum() to add multiple numeric values together. This function provides an efficient, readable, and Pythonic way to solve summation problems in your code. If you’re dealing with math computations that require summing numeric values, then sum() can be your lifesaver.

In this video course, you learned how to:

  • Sum numeric values using general techniques and tools
  • Add several numeric values efficiently using Python’s sum()
  • Concatenate sequences using sum()
  • Use sum() to approach common summation problems
  • Use appropriate values for the iterable and start arguments in sum()
  • Decide between sum() and alternative tools to sum and concatenate objects

To learn more about the concepts in this video course, check out these tutorials:

You’ll probably also enjoy these video courses:

With this knowledge, you’re now able to add multiple numeric values together in a Pythonic, readable, and efficient way.

Download

Course Slides (PDF)

1.8 MB

Become a Member to join the conversation.