sum()

sum(iterable , start )
iterable :input iterable
start : Optional , number to be added to after getting the sum of elements.

Return the sum of the elements plus start if available.

Using list
my_list=[1,2,5]
print(sum(my_list)) # 8
Using tuple
my_tuple=(1,2,5)
print(sum(my_tuple)) # 8
Using start ( Optional )
my_list=[2,4,5]
print(sum(my_list,5)) # 16 
max() Iterator any()



plus2net.com



Post your comments , suggestion , error , requirements etc here




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer