Insert Byte Data to Sqlite without b' preceeding
<p>I'm trying to insert into my sqlite3 database, an encrypted username, but its including <code>b'</code> proceeding the actual value.</p>

<p>This is causing issues on my application.</p>

<p>My code looks like:</p>

<pre><code>hashed_username = enc(prompt_account_username, salt)
print('\n\nusername: {}\n\n'.format(hashed_username))
</code></pre>

<p>This prints:</p>

<pre><code>username:

b'sc\x00\x02\x16\x88\x04\xa2\x9d\xb9!\xe0\x9e-5\xb3\x8a\xd8r\xbc\x83\x01\r\x98\xb1\xe3\xb2i=\x16\xc8Y\xbe\xdd\x0f\x8e\x8c\xa2\xb0\xd0R\xf7gx2\x1d\xfb\xfeX\xda\xb9Y\xd6Ls\x88\xaa&lt;\x9c\x12\xf3\xbeq\r\x8d\xcb\xc0\x8adF\x1dl\xc5\xde'
</code></pre>

<p>This is then inserting this full byte value, including the <code>b'</code></p>

<p>When I run:</p>

<pre><code>conn.execute("""
            INSERT INTO my_acct
            (acct_username)
            VALUES (?) """, (v[0], )
            )
</code></pre>

<p>How can I get it to insert, just the value, without the <code>b'</code>, with a value like:</p>

<pre><code>sc\x00\x02\x16\x88\x04\xa2\x9d\xb9!\xe0\x9e-5\xb3\x8a\xd8r\xbc\x83\x01\r\x98\xb1\xe3\xb2i=\x16\xc8Y\xbe\xdd\x0f\x8e\x8c\xa2\xb0\xd0R\xf7gx2\x1d\xfb\xfeX\xda\xb9Y\xd6Ls\x88\xaa&lt;\x9c\x12\xf3\xbeq\r\x8d\xcb\xc0\x8adF\x1dl\xc5\xde
</code></pre>

<p>Thank you</p>