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 Collections (2016, retired 2019) Tuples Stringcases

Error message: upper and lower cases??!!

I have checked this independently and it worked fine for all the cases.

stringcases.py
def stringcases(words):
    words_tup = words.lower(), words.upper(), words.title(),words[::-1]
    return words_tup

stringcases('buGGy TrEeHouse COMPILER!!')

1 Answer

The code challenge isn't buggy. It's just very picky. Note that you have the lower()-ed version of the string before the upper()-ed version of the string. Try it with the uppercase version first, then the lowercase version.

Transform this line:

words_tup = words.lower(), words.upper(), words.title(),words[::-1]

Into this:

words_tup = words.upper(), words.lower(), words.title(), words[::-1]

And you should be good to go :wink:

oh yea, I got it going thanks for pointing that out!

No problem! :)

Remember to provide a Best Answer if this answer helped you!