title: How to insert string into the BLOB column in Python
body: <p>I am trying to insert string into BLOB column using sqlite3 in Python. I saw some examples using binary file but I am trying to do it without files. Here is my code-</p>
  
  <pre><code>import sqlite3
  
  c = sqlite3.connect(path_to_db)
  
  # my string
  ablob = 'Hello world!'
  sql_statement = 'INSERT into table VALUES (?)'
  c.execute(sql_statement, [sqlite3.Binary(ablob)])
  c.commit()
  c.close()
  </code></pre>
  
  <p>After execution, new column with the string is added but not in a blob column.
  Does anyone know what is the problem?</p>