I have a string that will later be converted with int()
. It is three digits, anywhere from 0 to 3 of them might be 0's. How would I strip the 0s from the left side of the string?
Now I'm using string.lstrip('0')
but that strips all the 0s and makes the string empty, causing an error.