SyntaxFix
Write A Post
Hire A Developer
Questions
Remove leading + trailing '0':
list = [i.strip('0') for i in listOfNum ]
Remove leading '0':
list = [ i.lstrip('0') for i in listOfNum ]
Remove trailing '0':
list = [ i.rstrip('0') for i in listOfNum ]