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 :
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()something like
1_abc 2_abc 3_abccan i add a date/timestamp ?