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 Basics Types and Branching Strings and Operators

Spacing

I see that spacing is done when entering in strings for example (dessert+= '!' * 20) but I've noticed that it can be accepted this way as well (dessert+= '!'*20) so my question is is it best practice to space things out or does it not matter?

2 Answers

In that case, the spacing doesn't matter, but I think most people put spaces between math operators. Spacing matters more in Python later on when you learn functions and if statements.

Let me know if this helps!

Exactly the response I was looking for. Thanks man

Just gives it a much cleaner look