Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python return multiple value from a function using a dictionary

def name():
    n1 = "John"
    n2 = "Armin"

    return {1:n1, 2:n2}

names = name()
print(names)
Source by www.programiz.com #
 
PREVIOUS NEXT
Tagged: #python #return #multiple #function #dictionary
ADD COMMENT
Topic
Name
6+2 =