DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python list to arguments
a = [1, 2] def add(x,y): return x + y add(*a) # this is the same as add(a[0],a[1]) # returns 3
PREVIOUS
NEXT
Tagged:
#python
#list
#arguments
ADD COMMENT
Topic
COMMENT
Name
6+9 =
Submit