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

My code is not working.

can someone help me out please.

# 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 stringcases(my_string):
  return (my_string.upper(), my_string.lower(), my_string.title(), my_string[::-1]

Just have to remove the first parenthesis on return line :D

Thanks for the help.

1 Answer

Gary Porter
Gary Porter
11,139 Points

I see an opening parenthesis in the return statement, but it's not closed. Also, make sure you call the function and pass it the string that you want altered.