0d: 00h: 00m: 00s

🎁 Get 3 extra months of learning β€” completely FREE

That's 90 extra days to master new skills, build more projects, and land your dream job.

Become a PRO
Background Image

🎁 Get 3 extra months of learning completely FREE

Become a PRO
G
last year
Godfreycountry asked

How can you tell when there are extra spaces in your string?

Palistha Singh
Expert
last year

That's a good question!

When you look at the output, it can be difficult to notice extra spaces. That's why it's better to check the code carefully.

For example:

print("godfrey sami")

Here, there are no extra spaces before or after the text.

But:

print(" godfrey sami ")

In this case, there are spaces before and after the text β€” and you can clearly see that by looking at the code.

There are other ways to check for spaces automatically, but for now, we don't want to overwhelm you.

Just click on Next Lesson to keep going!

This question was asked as part of the course.