Python Programming Tutorial - 37: Variable Length Arguments

preview_player
Показать описание
In this tutorial we'll see how python allows functions to accept variable length arguments.
Рекомендации по теме
Комментарии
Автор

Your videos are really clear, you should have more views.

MichaelMerritt_of_sf
Автор

def sum(*args):
total = 0
for x in args:
total+=x
print (total)



sum(10, 20, 30, 40)

output :
10
30
60
100


why I am getting kind of arithmetic progression. I just need to see total SUM !!

What's wrong ??!

bharadwajramaraju
Автор

Please add videos for GUI programming in python, also please add videos on Django. Thanks...

manenyadav
Автор

One question, why is the return statement exist there? I notice that in this case, the function seems to work the same without the return statement. Don't python functions have an implicit return?

MichaelMerritt_of_sf
Автор

whats the diff btwn user defined and this tutorial :/

kannu