title: Naming a database, based on an input
body: <p>I'm sure this is either impossible, or really easy, but I can't figure it out. I'm trying to name a database based on an input. To sum it up very quickly:</p>
  
  <pre><code>import sqlite3
  import time
  import datetime
  
  global date
  d = datetime.datetime.today()
  month = str(d.month)
  day = str(d.day)
  year = str(d.year)
  date = month+day+year
  
  print(type(date))
  def name_creation():
      while True:
          global name
          name = input("What is the name? ")
          answer = input("Is the name correct?(y/n)")
          if answer not in ('y', 'n'):
              print ("Invalid input")
              name_creation()
              break
          if answer == 'y':
              break
          if answer == 'n':
              print ("Okay, re-enter name.")
      global name_date
      name_date = name + " " + date
  name_creation()
  conn = sqlite3.connect (eval(name_date).db)
  </code></pre>
  
  <p>most of this isn't important, but I've been trying to fix this for around 2 weeks. I'm sure I'm going about this all of the wrong way, but I can't find the problem so i can fix it.</p>