Python String lstrip() Method

Removes the specified leading characters from the start of a string.

Syntax

Python
string.ljust(length, character = " ")

Parameters

ParameterDescription
character Optional. The set of characters to strip from the beginning of the string. Default is a space (" ")

Example

Python
print('Hello World!'.lstrip('Hello '))

Output

World!