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 (Retired) Say Hello to Python Help Hotline

the answer should be - help(str) ?

i tried dir(str) too... but didn't pass..

2 Answers

Stone Preston
Stone Preston
42,016 Points

the question is To get help for the method center that belongs to the str class, I'd use

your answer was

help(str)

however that gets help for the str class, we want help for a specific method of the str class called center. to do that you can use dot syntax

help(str.center)

Kenneth covers this concept at 2:47 of this video

thank you!