I have tab occured at the beginning of a string in a list, I'm uploading. I've tried all the methods I've found to remove it, but it doesn't work
Actually you can see what I've tried in the code itself. Nothing works
# 2D List I got [['12/20', 'Instrument', 'Maintainance', '\tDeb', 'Pb', 'Tool', '5']]
# \tDeb - is the one with tab, I want to remove
import re
for line in list_2D:
for piece in line:
re.sub(r"[\n\t\s]*", ' ', piece)
piece.replace("\t","")
piece.replace("\\t","")
print(list_2D[0][3])
# Result -> " Deb"
As a result I want to get any string with similar issue without that tab.