November 2019

Python

Python – Getting all the methods available to a data type

>>> myStuff = ‘Hello world’ >>> type(myStuff) <class ‘str’> >>> dir(myStuff) [‘capitalize’, ‘casefold’, ‘center’, ‘count’, ‘encode’, ‘endswith’, ‘expandtabs’, ‘find’, ‘format’, ‘format_map’, ‘index’, ‘isalnum’, ‘isalpha’, […]

Scroll to Top