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

tuple test

why is my code marked as wrong why i type in workspace, but works fine in IDLE or Athom.

I can't seem to see my mistake.

stringcases.py
def stringcases(arg):
    lower_arg = tuple((arg.lower()).split())
    upper_arg = tuple((arg.upper()).split())
    title_arg = tuple((arg.title()).split())
    reverse_arg = (arg.split())[::-1]

2 Answers

The function is supposed to return a tuple of string values. Your function doesn't return anything.

aa... of course. Instead of 'return' I was using print() XD

thank you

Alexander Schott
PLUS
Alexander Schott
Courses Plus Student 937 Points
stringcases.py
def stringcases(word):
    return word.upper(), word.lower(), word.capitalize(), word[::-1]

why is that marked as wrong?