title: How to create a SQLite3 database of variable name safely
body: <p>this is the code I would like to have, where I do not have to exactly specify the <code>howtodothis</code> variable during database creation. I want it to be dynamic instead.</p>
  
  <pre><code>class DbHandler():
      def __init__(self, howtodothis):
          self.database = sqlite3.connect('api_data.db')
          self.cursor = self.database.cursor()
          self.cursor.execute("CREATE TABLE IF NOT EXISTS ? (test)",(howtodothis,))
  
      def insert(self):
          self.cursor.execute("INSERT INTO ? VALUES (?)",(howtodothis,))
  </code></pre>
  
  <p>I now have this, but I wonder if it is safe</p>
  
  <pre><code>class DbHandler():
      def __init__(self, thisworks):
          self.database = sqlite3.connect('api_data.db')
          self.cursor = self.database.cursor()
          self.cursor.execute(f"CREATE TABLE IF NOT EXISTS {thisworks} (test)")
  
      def insert(self):
          self.cursor.execute(f"INSERT INTO {thisworks} VALUES (?)")
  </code></pre>