Aug-22-2019, 04:22 AM
1 2 3 4 5 6 7 8 9 10 |
def func( * items): print ( type (items)) a = list (items) print ( type (a)) a[ 3 ] = 1026 for i in a: print i items = [ 1 , 3 , 7 , 9 , - 99 , 555 , 88 ] func( * items[:]) |
In all examples I see the default usage of *args is to print, or do some things fairly useless. Being new, I might have overlooked something blazingly obvious - which is why I put this question here:
Is conversion to tuple in *args functions default behaviour for list(array) arguments?
And is there a simple way to call variable arguments and have them default to mutable data types? A decorator?