docstring UK /ˈdɒk.stɹɪŋ/US /ˈdɑk.stɹɪŋ/ noun1 •A string literal specified in source code that is used, like a comment, to document a specific segment of code, but remains available at run-time. formsdocstrings