Strip tabs : lstrip « String « Python Tutorial






import string


badSentence = "\t\tThis sentence has problems.   "

print "\nBad:\n" + badSentence
print "\nFixed:\n" + badSentence.lstrip('\t')








5.17.lstrip
5.17.1.Strip tabs
5.17.2.Stripping whitespace from a string.