Algorithms · 3. Using the sum() method. This is the simplest approach. Python has the built-in function sum() to compute the sum of the list. See the code below:.
確定! 回上一頁