Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Set the directory where the file is available
- os.chdir('C:\\Users\\pedroalejandro.tavar\\Desktop')
- #infile is the data and outfile contains the output file name's
- infile = "coma_file.txt"
- outfile = "tab_file.txt"
- with open(infile, "r") as infile1:
- with open(outfile, "w") as outfile1:
- for line in infile1:
- fields = line.strip().split(",")
- outfile1.write("\t".join(fields))
- outfile1.write("\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement