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

Ike Nwabara
Ike Nwabara
204 Points

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!

Ike Nwabara
Ike Nwabara
204 Points

Exactly the response I was looking for. Thanks man

Just gives it a much cleaner look