-3

with this following python 3 code :

print("The nodes visited in the frontier are:", end = " ")

i get this error

IndentationError: unexpected indent

how to fix this?

Trenton McKinney
  • 43,885
  • 25
  • 111
  • 113

2 Answers2

0

Correct

if 5 > 2:
    print("Five is greater than two!")

Incorrect

if 5 > 2:
print("Five is greater than two!")

Find more info here https://docs.python.org/2.0/ref/indentation.html Or here (2.1.8. Indentation), https://docs.python.org/3/reference/lexical_analysis.html#line-structure

vitaliis
  • 3,819
  • 5
  • 13
  • 32
0

I think you should remove the space before print(). By your statement, I suppose this works well

print("The nodes visited in the frontier are:", end = " ")  #removed the space in the beginning