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!
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
Anthony Inman2,320 Points
Not sure what output is expected for this challenge? Is it asking for a entire string to be formatted in first upper....
Is it asking me to return four different versions of the entire string or is it asking me to split the string and supply upper for list, then lower for list .....etc?
# 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(value): str_list = value.split() upper_str = str_list.upper() lower_str = str_list.lower() cap_first = str.capitalize() reverse = str_list[::-1] my_tpl = (upper_str,lower_str,cap_first,reverse) return my_tpl
Kenneth LoveTreehouse Guest Teacher
Yep. You're returning a tuple with 4 items in it, each item being one of those versions of the string.