We see here that opening and writing data to a series of separate files is, as we have come to expect from Python, very simple and straightforward. Once we have seen an example of the correct syntax, it just works.
# file_write_2.py #>>>>>>>>>>>>> # Let's create a file and write it to disk. filename_1 = "/constr/test_write_1.dat" filly = open(filename_1,"w") # Create a file object, in # write mode filly.write("This is number one and the fun has just begun") filename_2 = "/constr/test_write_2.dat" filly = open(filename_2,"w") # Create a file object, in # write mode filly.write("This is number two and he has lost his shoe") filename_3 = "/constr/test_write_3.dat" filly = open(filename_3,"w") # Create a file object, in # write mode filly.write("This is number three and a bump is on his knee") #filly.close()
18.191.181.36