SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 80 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Set the directory where the file is available
  2. os.chdir('C:\\Users\\pedroalejandro.tavar\\Desktop')
  3.  
  4. #infile is the data and outfile contains the output file name's
  5. infile = "coma_file.txt"
  6. outfile = "tab_file.txt"
  7.  
  8. with open(infile, "r") as infile1:
  9.     with open(outfile, "w") as outfile1:
  10.         for line in infile1:
  11.             fields = line.strip().split(",")
  12.             outfile1.write("\t".join(fields))
  13.             outfile1.write("\n")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top