📜  从另一个 python 函数访问数据 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:39.947000             🧑  作者: Mango

代码示例1
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=" ")