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 trialPiyush Patel
17,253 PointsDon't understand the last question
I am not sure what the reversed mean? Is it asking for str = "hello hi how are you" to result in "you are how hi hello"
I tried it but didn't work with this code.
import string
def stringcases(str):
str_list = str.split()
str_list.reverse()
str2 = " ".join(str_list)
return str.upper(), str.lower(), string.capwords(str), str2
1 Answer
Jon Mirow
9,864 PointsI would expect that it means "hello world" becomes "dlrow olleh" given that each other requirement is applied to the string as a whole?
Piyush Patel
17,253 PointsPiyush Patel
17,253 PointsOk Thank you it worked out.