str.lstrip('characters')
'characters' is optional
Let's see with Examples:
str = 'Welcome to getechready'
new_str = str.lstrip('Wel') #the argument is case senstitve
print(new_str)
>>>come to getechready
str = ' Welcome to getechready'
new_str = str.lstrip()
print(new_str)
>>>Welcome to getechready
str = ' mississippi river'
new_str = str.lstrip('is m')
print(new_str)
>>>ppi river
As you can see the space can be provided at any position, it is not mandatory to provide space at first position only. Let's see if we do not provide space
str = ' mississippi river'
new_str = str.lstrip('ism')
print(new_str)
>>> mississippi river
Nothing is removed as lstrip() was expecting a space also to match the starting characters.
Also read: strip() method and rstrip() method