-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
  • 56,955
  • 33
  • 144
  • 158

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
  • 4,082
  • 5
  • 18
  • 40
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