Python String lstrip() method

The string. lstrip () method in Python returns a copy of the string with leading characters removed (based on the string argument passed).

Syntax

Parameter

chars(optional): This parameter represents a string specifying the set of characters to be removed.

Return

This method returns a copy of the string with leading characters removed. 

Example 1

Output

Example 2

Output

Pin It on Pinterest

Share This