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 Basics (2015) Python for Beginners Second Quiz

I don't know how to use help to find the str class's upper method

I tried using different ways that I thought might work like.. help(class.center) help(class.method) help(class.method.center) etc... Could you please tell me what I'm getting wrong and explain why it's wrong. Thanks

1 Answer

Try this:

help(str.upper)

The period (or dot or full stop) tells Python: "Look up the 'upper' function on 'str'!" (str is short for string).

You don't have to fully understand it now; you will understand better after you go through the Object-Oriented Python course. (Don't rush; you should finish both the Python Basics course and the Python Collections course before taking the Object-Oriented Python course.)

~Alex

Thanks, I realised yesterday that if it was STR class's Upper method, then that should be right. I guess I was a little tired