Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

what happen when we apply * before list in python

Asterisks for unpacking into function call
That print(*fruits) line is passing all of the
items in the fruits list into the print 
function call as separate arguments, without 
us even needing to know how many arguments are in the list.
... Both * and ** can be used multiple times in function calls
Source by treyhunner.com #
 
PREVIOUS NEXT
Tagged: #happen #apply #list #python
ADD COMMENT
Topic
Name
7+1 =