Sep-10-2018, 12:08 PM
I want to create a new .txt file every time i run the python script. Any idea how to do that . My current code :
something like
can i add a date/timestamp ?
1 2 3 4 5 |
def write_up_commands(up_int): fp = open ( './abc.txt' , 'a+' ) for i in up_int: fp.write( 'int ' + i + '\n mode \n' ) fp.close() |
1 2 3 |
1_abc 2_abc 3_abc |