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
ella blue
2,252 PointsI don't understand this question To get help for the method center that belongs to the str class, I'd use ..............
To get help for the method center that belongs to the str class, I'd use .......... my answer is str.rjust
4 Answers
Chris Freeman
Treehouse Moderator 68,468 PointsYou've learned that help on a class can be found by using:
help(cls)
center is a method of the string class. To get help on a class method, you can use:
help(cls.method)
ella blue
2,252 PointsI tried this answer and got error!
Chris Freeman
Treehouse Moderator 68,468 PointsCan you copy and paste exactly what you tried? Remember to replace "cls" with str, and the "method" with the name of the method you need help on, in this case center.
ella blue
2,252 Pointsstr.rjust
Chris Freeman
Treehouse Moderator 68,468 Pointsyou need to include the call to the help function by enclosing what you typed with "help()"
ella blue
2,252 Pointshelp(cls.method)
Chris Freeman
Treehouse Moderator 68,468 PointsTry putting your two answers together. Also, the question is asking about the center() method, not the rjust() method:
Chris Freeman
Treehouse Moderator 68,468 PointsChris Freeman
Treehouse Moderator 68,468 PointsSubstitute str for "cls", and center for "method".