I don't need to be a nuke operator to spot that flaw (never used nuke). Float can only convert something thats numeric into numeric stuff.
>> float('foobar')
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
float('foobar')
ValueError: invalid literal for float(): foobar
See what the computer is complaining about is that 'foobar' can not be considered a number, the computer doesnt jsut know what to think about it. So whoever did the underlying stuff does what programmers are supposed to do when stuff like this happens, complain about it in form of a exception. In your case foobar just happens to be [1.2,1.2,1.3].
Now i don't happen to know what the Nuke API says about the setValue but i suspect itMAY say that you can pass a array into the. So you were possibly trying to do one of the following things:
b = eval(a[2])
n['gain'].setValue(b,0,0)
b = eval(a[2])
n['gain'].setValue(b[0],b[1],b[2])
Anyway, eval is a really dangerous thing to use. If you dont know what your actually doing dont use it. Because its a very effective way of shooting yourself in the leg, scratch that, fumble with a grenade is more approriate.