Skip to main content

dedent

Remove indentation.

def dedent(
s: string,
sep: string = \n
) - > string

Remove indentation.

Parameters

NameTypeDescription
sstringThe input string containing indented lines to be processed
sepstring = \nThe character or string used to join the dedented lines back together

Returns

TypeDescription
stringThe processed string with leading whitespace removed from each line, rejoined using the specified separator