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

I've been on this question for an hour help please! Its getting right answer.

Can someone tell me whats wrong? i give it what it asks for.

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 sli
#Wrong output. Got: TREEHOUSE LOVES YOU, treehouse loves you, Treehouse Loves You, you loves Treehouse

def stringcases(tst):
  a = tst.split()
  a.reverse()
  return tst.upper(), tst.lower(), tst.title(), ' '.join(a)

Tst = 'Treehouse loves you'
stringcases(Tst)

1 Answer

Pls ignore I solved