Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Write Better Python Cleaner Code Indentation

Sai Kiran Dasika
Sai Kiran Dasika
Courses Plus Student 7,278 Points

What is wrong in this code?

Hey could someone tell me where I am wrong?

def small_function():
  return True

def bigger_function():
  alpha = 2
  beta = 4
  return (alpha, beta)

3 Answers

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Hello Sai.

The code challenge is asking you to set all the indentation (where required) to 4 spaces instead of 2 like it currently is.


Chris Freeman
Chris Freeman
Treehouse Moderator 67,995 Points

Unfortunately, some of the challanges use 2-space indents, others use 4-space indents. In this challenge, they are looking for all indents to be a multiple of 4 spaces.