Python Python Collections (2016, retired 2019) Dungeon Game Movement

Klaudija Ljevar
Klaudija Ljevar
4,476 Points

Inconsistent use of tabs

Hi everybody I need help here.. Not sure what is the meaning of this error and how to solve it.

def get_moves(player): moves = ["LEFT", "RIGHT", "UP", "DOWN"] x, y = player if x == 0: moves.remove("LEFT") if x == 4: moves.remove("RIGHT") if y == 0: moves.remove("UP") if y == 4: moves.remove("DOWN")

2 Answers

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 50,871 Points

It will be hard to tell here, especially without using markdown, but it means each indentation should use the same number of tabs. Somewhere you have an extra/missing tab or space. You'll have to go line by line and re-indent.

Klaudija Ljevar
Klaudija Ljevar
4,476 Points

Thank you, I've found it. :)

Abdumalik Sharipov
Abdumalik Sharipov
2,243 Points

hello Klaudija Ljevar. I recommend you and who is reading this comment watching Markdown_Basics, and it increases your resource code readability and stand out quite nicely. I am leaving the link below. Check it out before going on further. Trust me it makes your code whole lot snazzy and goes a long way.
This one the whole course: Markdown_Basics
Or for just quick peek:
Markdown_Basics_TreehouseForum
And check out this link too:
Pasting_Your_Code