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 (2015) Logic in Python Loop

non-english characters causing script to fail

The challenge task asks to print each item in the hellos list along with " World". the script appears to spit out the answer correctly in the preview, although it doesn't seem to represent the non-roman letters correctly. the Check Work indicates that the script doesn't find all of the hellos. I think this might be an issue with the non-roman characters, am curious how to proceed to fix the script so it works

rydavim
rydavim
18,813 Points

Could you post your code? It will be much easier for someone to help figure out what's wrong if we can see what you've already tried. :)

2 Answers

I found the issue - an extra space before "World" was foiling the checker. Removed it and all is working now. Thanks for the responsive feedback - much appreciated!

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,423 Points

The code to pass the challenge is straightforward:

for greet in hellos:
    print("{} World".format(greet))

Can your post your code? Which "hellos" aren't being generated?

Chris Freeman
Chris Freeman
Treehouse Moderator 68,423 Points

Is it possible you are running Python 2 which does not use unicode by default? In Python 3, all strings are unicode.