Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

unpack tuple python

def myFunc(word1="", word2=""):
	return word1+" "+word2
# passes tuple elements as separate arguments
print(myFunc(*("hello","world"))) # or
print(myFunc(*("oneArgument",))) # , to imply its an interable
 
PREVIOUS NEXT
Tagged: #unpack #tuple #python
ADD COMMENT
Topic
Name
6+8 =