Member since
05-25-2019
1
Post
0
Kudos Received
0
Solutions
05-26-2019
02:42 AM
By mentioning "n=[]" as an argument to your func() definition, you mean to provide an empty Python list as the default parameter. The problem is with your code that neither you are printing "n" nor it is being returned by the func(). You can try and use the below-updated code: >>> def func(n=[]):
... print(n)
...
>>> func([1,2,3])
[1, 2, 3]
>>> func()
[]
... View more