String lstrip() will remove leading whitespaces in string and String rstrip will remove trailing whitespaces if char are none otherwise char are removed as shown below.
Str.lstrip() & Str.rstrip():
d string leading spaces removed when string lstrip() applied & when str.rstrip() applied it returned string with trailing whitespaces removed. On a string when lstrip applied with char “b” inserted it had removed b character in output.
[…] Str.lstrip:It removes all leading […]