What is the syntax to trim leading chars/spaces from a string?

<string name>.lstrip(<char>)
#examples
str = ' Hello World'
str2='0000bye0000'

print(str.lstrip())
print(str2.lstrip('0'))

#output
Hello World
bye0000

 

Advertisements