by Random_Person · 16y ago · 0 comments
Okay, so, stripping spaces from string values. Easy? If I import my line, I have 6 strings I need to segment out of it and my file uses spaces. So, in my previous line:
out_file.write(' <td>' + line[0:12] + '<td>\n')
I'd like to strip the spaces from line[0:12]Thanks!
line[0:12].strip()
but see my other comment about str.split().