The lstrip Method in Python: Removing Characters from the Left

The lstrip method returns a copy of a string with specified characters removed from the start (left l — left).

lstrip([chars])

  • chars=None -- a string of characters to remove. If not specified, whitespace characters are removed. This is a list of characters to remove, not a prefix or suffix.
'abca'.lstrip('ac')  # 'bca'