Post

Sergei Kotov
Sergei Kotov@kotov_dev·
@Python_Dv Answer: B (15) For beginners: sum() is a built-in function that adds all numbers in a list. sum([1,2,3,4,5]) = 1+2+3+4+5 = 15. It returns a single integer, not a list. Super useful for quick totals without writing a loop!
English
0
0
30
675
Manish Khyalia
Manish Khyalia@Manish_Kumar60·
@Python_Dv Answer:- (B) The sum() function in Python adds all the elements of a list (or any iterable) and returns the total.
English
0
0
0
485
Royce
Royce@Royce4Q2·
@Python_Dv num_list =[1, 2, 3, 4, 5] result = sum(num_list) print(result) // 15
English
0
0
0
219
Paylaş