阅读背景:

使用Python将制表符分隔的txt文件转换为csv文件

来源:互联网 

So I want to convert a simple tab delimited text file into a csv file. If I convert the txt file into a string using string.split('\n') I get a list with each list item as a string with '\t' between each column. I was thinking I could just replace the '\t' with a comma but it won't treat the string within the list like string and allow me to use string.replace. Here is start of my code that still needs a way to parse the tab "\t". So I want to convert a simple tab delimited tex




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: