Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

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