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

Anybody know the answer to the question asking how to get help from the method center that belongs to a string?

I've already tried:



dir(str.method center)

3 Answers

Temi Adeoye
Temi Adeoye
13,199 Points

Hi David, help(str.center) should do the trick. I see you passed the word "method" to the help function. The method referred in the question is "center" – simply identified as "center", and not "method center". Just like the function you called to get help is identified as help, and not "function help()".

Thank you so much!

Temi Adeoye
Temi Adeoye
13,199 Points

You're welcome, David. I'm happy I was able to help you. Feel free to hit the forum if you're stuck on anything else. Everyone is pretty nice around here.