5 ms·
Ugh. Forget I wrote that. :) Amazing what a \n can do! Okay, so, stripping spaces from string values. Easy? If I import my line, I have 6 strings I need to
by Random_Person 16y ago
Ugh. Forget I wrote that. :)
Amazing what a \n can do!
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!
- zephyrfalcon 16y agoline[0:12].strip() but see my other comment about str.split().