trailing_removed = [s.rstrip('0') for s in listOfNum]
leading_removed = [s.lstrip('0') for s in listOfNum]
both_removed = [s.strip('0') for s in listOfNum]
How to remove leading and trailing zeros in a string? Python