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

                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 20, 2020 in Python by paradox
• 120 points

edited Nov 20, 2020 by Gitika 175 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 20, 2020 by anonymous
• 65,870 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,140 points
0 votes
3 answers

Python error "IndentationError: expected an indented block"

IndentationError:  what is the mean READ MORE

answered Oct 14, 2020 in Python by anonymous
• 140 points
0 votes
1 answer

i write this python to read dataset into panda data frame but im getting NameError: name 'true' is not defined. Below is the code:

change  def parse(path):   g = gz ...READ MORE

answered Mar 14, 2020 in Python by Abhishek Shingadiya
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
0 votes
1 answer
+1 vote
10 answers

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

Just for the record: >>> int('55063.000000') Traceback (most recent ...READ MORE

answered Aug 17, 2020 in Python by pakainfo
• 200 points