I ve been trying to run this code but the error says Expected an indented block for the line word as list index guess

0 votes
else:

                print("Good job,", guess, "is in the word!")

                guessed_letters.append (guess)

                word_as_list = list(word_completion)

                indicates = [i for i, letter in enumerate(word) if letter == guess]

                for index in indices:

                word_as_list[index] = guess

                word_completion = "".join(word_as_list)

                if "_" not in word_completion:

                    guessed = True
Nov 21, 2020 in Python by paradox
• 120 points

edited Nov 21, 2020 by Gitika 1,080 views

1 answer to this question.

0 votes

Hi, @Paradox,

The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces. The indentation can be any consistent white space. 

answered Nov 21, 2020 by anonymous
• 65,770 points

Related Questions In Python

+2 votes
0 answers
0 votes
1 answer

I was written the python program, am getting error message "IndentationError: expected an indented block"

Hi@Thiyagarajan, You have one else block in your ...READ MORE

answered May 27, 2020 in Python by MD
• 95,460 points
3,552 views
+2 votes
9 answers

Python error "IndentationError: expected an indented block"

Python requires its code to be indented ...READ MORE

answered Jun 17, 2019 in Python by Varun

edited Jun 17, 2019 324,179 views
0 votes
0 answers

Struck to do an application on amazon price tracking

Sir I want to do an application ...READ MORE

Apr 7, 2020 in Selenium by Likhitha
• 120 points
699 views
+1 vote
1 answer
+2 votes
10 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,560 points
409,217 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP