class Hangman: #class hangman
def Word_list(self):
result=random.choice(['debtee', 'mob', 'freight', 'torment', 'freight train', 'boredom','botcher', 'bothersome', 'bungler', 'continuation', 'officially', 'practically'])
word_len=len(result)
word_store=list(result)
def main_game(self):
#print('The word is %s long'%Word_list.list_result_len)
spaces=[]
for space in range(1,10):
spaces.append('_ ')
chance=10
print(spaces)
for x in range(1,10):
choose =input('Kindly choose a letter that you think this word contains :')
if choose in self.word_store: #facing the issue here
position=self.word_store.index(choose)
spaces[position]= choose
print(spaces)
print("Great!! This letter is present in the word, Keep Going")
else:
chance=chance-1
print("Sorry this letter does not exist in the word")
hangman_figure(chance)