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 trialMathew Yangang
4,433 Pointstuple
So what's wrong with this code?
def stringcases(single_string):
single_string.upper(),single_string.lower(),single_string.title(),single_string[::-1]
1 Answer
Alexander Davison
65,469 PointsYou aren't actually return
ing anything. Try return
ing the tuple you made.
def stringcases(single_string):
return (single_string.upper(),
single_string.lower(),
single_string.title(),
single_string[::-1])
(Note that I extended the tuple to multiple lines. This isn't required, but it looks nicer in my opinion.)
Mathew Yangang
4,433 PointsMathew Yangang
4,433 PointsThanks Alexander , i forgot to return