Advertisement
Guest User

Basic_Split.py

a guest
Jun 5th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. def main():
  2.  
  3.  
  4.     f = open("new_array.js", "rb")
  5.     data = f.read()
  6.     f.close()
  7.     split_data = data.split(",")
  8.    
  9.     #print split_data
  10.     f = open("new_array1.js", "wb")
  11.    
  12.     for item in split_data:
  13.        
  14.         f.write(item)
  15.         f.write("\n")
  16.  
  17.     print "\nFinished!"
  18.  
  19.     f.close()
  20.  
  21. if __name__ == "__main__":
  22.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement