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

stringcases

Not sure what i'm doing wrong here , but i don't exactly where the problem is. Any idea please?

stringcases.py
def stringcases(""):
    letters = 'treehouse'
    for letter,case in enumerate(letters.upper()):
    for letter,case in enumerate(letters.lower()):
    for letter,case in enumerate(letters.title()):
    for letter,case in enumerate(letters([::-1])):


     return letters

1 Answer

Steven Parker
Steven Parker
229,644 Points

There seems to be a few issues, here are some hints:

  • the parameter name cannot be an empty string literal
  • you will need to work with the supplied argument instead of the word "treehouse"
  • you won't need any loops
  • you won't need to enumerate anything
  • the return value needs to be a tuple containing all 4 variations of the argument
  • the "return" line is indented one space too far