Creating a folder with timestamp
<p>Currently am creating files using the below code,I want to create a directory based on the timestamp at that point in the cwd,save the directory location to a variable and then create the file in the newly created directory,does anyone have ideas on how can this be done?</p>

<pre><code>def filecreation(list, filename):
    #print "list"
    with open(filename, 'w') as d:
        d.writelines(list)

def main():
    list=['1','2']
    filecreation(list,"list.txt")

if __name__ == '__main__':
    main()
</code></pre>
