Simple Hangman game in Python3
Right now the program will have a problem if you use a word which has the same letter more than once. string.index will only return the index of the first occurrence. What you could do instead is use a set to check what letters still need to be guessed. If a character in the word is still in the set, it hasn’t been guessed and an underscore should be printed. If it isn’t in the set, it has been guessed and it should be printed.
The code can be simplified significantly. You only really need one function which takes a list of strings as an argument. You could do something like this:
import random

def hangman(word_list):
    word = random.choice(word_list)
    letters = set(word)
    guesses = len(word) + 3
    while len(letters) &gt; 0 and guesses &gt; 0:
        guess = input(str(guesses) + &quot; guesses left\nguess something:\n&quot;)
        if guess in letters:
            print(&quot;correct&quot;)
            letters.remove(guess)
        else:
            print(&quot;wrong&quot;)
        guesses -= 1
        print(*(ch if ch not in letters else '_' for ch in word))
    print(&quot;win&quot; if len(letters) == 0 else &quot;lose&quot;)

if __name__ == &quot;__main__&quot;:
    hangman([&quot;bike&quot;, &quot;monkey&quot;, &quot;planet&quot;, &quot;mississippi&quot;])

NITPICKING
You have a function in your current code which could be replaced with a call to input. the user_input function could be replaced with this: input(&quot;Enter a guess:\n&quot;). Also you can simplify this:
if game:
    print(&quot;Bravo&quot;)
    self.no_of_try -=  1
else:
    self.no_of_try -=  1
    print(&quot;Wrong&quot;)

into this:
self.no_of_try -=  1
print(&quot;Bravo&quot; if game else &quot;Wrong&quot;)

I also noticed a couple things in the __init__ method. The word list and the randomly chosen word’s length don’t need to be instance variables because they’re only used in __init__, and you don’t need to cast the length to int because it’s already an int.