Remove Leading Zeros From A Python String With .lstrip()
Passing a zero to .lstrip()
will remove leading zeros instead of trimming leading whitespace
=
=
Output:
1234
-
Add example of
.lstrip('w.')
or whatever for the multiple character strip. - Check if doing int() also strips leading zeros
- Either way make a version that turns the string into an int
-- end of line --