Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to use variable from another function in python

>>> def oneFunction(lists):
        category=random.choice(list(lists.keys()))
        return random.choice(lists[category])


>>> def anotherFunction():
        for letter in oneFunction(lists):              
        print("_",end=" ")
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variable #function #python
ADD COMMENT
Topic
Name
6+3 =