Answers for "access data in one python function from another"

0

access data in one python function from another

s = Spam()
s.oneFunction(lists)
s.anotherFunction()
Posted by: Guest on November-26-2020
0

access data in one python function from another

class Spam:
    def oneFunction(self,lists):
        category=random.choice(list(lists.keys()))
        self.word=random.choice(lists[category])

    def anotherFunction(self):
        for letter in self.word:              
            print("_", end=" ")
Posted by: Guest on October-07-2021

Code answers related to "access data in one python function from another"

Python Answers by Framework

Browse Popular Code Answers by Language