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 (Retired) Tuples Stringcases

Blake Handson
Blake Handson
1,642 Points

I need some help! Where have I gone wrong ?

Not sure why this isn't working, could anyone enlighten me why this isn't passing the challenge requirements ?

stringcases.py
# Handy functions:
# .upper() - uppercases a string
# .lower() - lowercases a string
# .title() - titlecases a string
# There is no function to reverse a string.
# Maybe you can do it with a slice?



def string_cases(string):
  thingo = string.upper(), string.lower(), string.title(), string[::-1]

return (thingo)

2 Answers

Kourosh Raeen
Kourosh Raeen
23,733 Points

The function's name should be stringcases . You also need to indent the return statement.

Blake Handson
Blake Handson
1,642 Points

Thanks Kourosh! Grr.. it was so obvious.