I have a string that will be converted later using int(). These are three digits, from 0 to 3 of them can be 0. How would I split 0s on the left side of the string?
Now I use string.lstrip('0'), but this removes all 0 and makes the string empty, causing an error.
source
share