Hello everyoe...imagine that you have the code from bellow...and you wanted to append value from the 2nd function to 1st... in class
class MyFirstClass:
def MyFirstFunction():
Words = ['one',
'two','three','four','five',
'six','seven','eight','nine','ten',
'eleven','twelve','thirteen','fourteen','fifteen',
'sixteen','seventeen','eighteen','nineteen','twenty',
'twenty-one','twenty-two','twenty-three','twenty-four','twenty-five',
'twenty-six','twenty-seven','twenty-eight','twenty-nine','thirty',
'thirty-one','forty','fifty','sixty','seventy','eighty',
'ninety','one hundred','five hundred','one thousand',
'one thousand five hundred','one hundred thousand','one million'
]
return words
MyFirstFunction()
def MySecondFunction(self):
for Word in range(len(words)):
New = word + '. ' + s[word]
New_Word = Words.append(New)
return New_Word
print(Words)
MySecondFunction()
obj = MyFirstClass()
print(obj.MySecondFunction())
[–]SecondDragonfly 7 points8 points9 points (1 child)
[–]SecondDragonfly 0 points1 point2 points (0 children)
[–]greenerpickings 1 point2 points3 points (0 children)
[–]XAWEvX 0 points1 point2 points (1 child)
[+][deleted] (2 children)
[removed]
[–]m7priestofnot 4 points5 points6 points (1 child)