The print row command outputs:
['test one']
I want 'test' to go into Category and 'one' to go into Value.
In that case you'll want this:
c.execute("INSERT INTO a (Category, Value) VALUES (%s, %s)", tuple(row[0].split()))
Basically this takes the element [0], which represents that string 'test one', and then splits it (the default split delimiter is a space), so it turns it into ['test', 'one']. Finally, you just need to turn it into a tuple.
When doing string formatting, you need to have a tuple containing each argument for string formatting as an element. Here's an example of a string formatting requiring two arguments:
>>> print 'Hey %s totally %s check' % ('test', 'one')
Hey test totally one check
>>>
As you can see, I need two things to fill into the
%s pieces. The two elements in the tuple satisfy this requirement.
Here's the transformation from "row" to the tuple required in broken down steps:
>>> row = ['test one']
>>> row[0]
'test one'
>>> row[0].split()
['test', 'one']
>>> tuple(row[0].split())
('test', 'one')
>>>