This article is part of in the series
Published: Sunday 29th January 2017

In Python, help() is a super useful built-in function that can be used to return the Python documentation of a particular object, method, attributes, etc. This is such a helpful tool for Python beginners to know that many of them are probably unaware of. All you need to do is pass the object or whatever you’d like help with through the parameters of the help() function to get a nice background on what it does and how it works through the official Python documentation. Here’s how to use it:

Let’s say you want to get some information on Python’s string attributes. Here’s what you would do to get this info using help:

help(str)

The output of this function will be informative and detailed info on the str attribute in the form of built-in help messages from Python’s documentation. For beginner coders especially, this one’s definitely a tool worth keeping in your tool belt.