and move it straight up like in figure - you'll see that the else keyword' indentation is the same as the if keyword' indentation on line figure - the else statement is matched with the if statement at the same indentation so if the condition on line (guess in secretwordwas falsethen the execution moves into this else-block wrongly guessed letters are concatenated to the missedletters string on line this is like what line did for letters the player guessed correctly check if player has guessed too many times and lost if len(missedletters=len(hangmanpics displayboard(hangmanpicsmissedletterscorrectletterssecretword print('you have run out of guesses!\nafter str(len(missedletters)missed guesses and str(len(correctletters)correct guessesthe word was "secretword '"' gameisdone true each time the player guesses wrongthe code concatenates the wrong letter to the string in missedletters so the length of missedletters (orin codelen(missedletters)is also the number of wrong guesses the hangmanpics list has ascii art strings so when len(missedlettersequals you know the player has lost because the hangman picture will be finished rememberhangmanpics[ is the first item in the listand hangmanpics[ is the last one sowhen the length of the missedletters string is equal to len(hangmanpics (that is )the player has run out of guesses line prints the secret word and line sets the gameisdone variable is set to true