title: How to ask for filename whilst adding today's date and time in Python?
body: <p>I have written the code for automation of creating file with date and time format. So, the file output would be</p>
  <p><strong>Product_Name-date</strong></p>
  <p>From this code:</p>
  <pre><code>filename = datetime.now().strftime('Product_Name-%Y-%m-%d-%H-%M.csv')
  with open(filename, &quot;w+&quot;) as f_output:
      csv_output = csv.writer(f_output)
      csv_output.writerow([&quot;Name&quot;, &quot;Price&quot;])
      for d in datas: csv_output.writerow(d)
  </code></pre>
  <p>However, I want to ask for input from user to manually name each file. To become:</p>
  <p><strong>UserInputProduct_Name</strong>-date</p>
  <p>I've read the tutorial from W3School, but I can't implement it correctly.</p>
  <pre><code> filename = input(&quot;Input the Filename: &quot;)
   f_extns = filename.split(&quot;.&quot;)
   print (&quot;The extension of the file is : &quot; + repr(f_extns[-1]))
  </code></pre>
  <p>How do I do that?</p>