 how to get all attributes, methods, etc of an object in Python. For example, let's create a variable that contains string. If we want to get all attributes and methods of this object, we're gonna use dir function and press enter. And as you can see, this object has large number of methods, format is alpha, numerical is decimal, is lowercase, uppercase and so on.