Functions in Python presentation
Here is my presentation part of the in company Python course.
The last slide – “Problem to solve” is something like a simple homework. Sample solutions will be uploaded later this week.
Here is my presentation part of the in company Python course.
The last slide – “Problem to solve” is something like a simple homework. Sample solutions will be uploaded later this week.
this slide confuses me completely.
why does func() remembers the a from the previous run? the default should be an empty list and this should be the default for the each and new call of func ? where’s it the catch I miss?
I meant slide no. 12
def func(a=[]):
a.append(2)
print a