Q:

assignment to multiple indirectly addressed variables

Single assignment works like this: (there may be better ways)
b='bb'
vars()[b] = 10
bb
>>>10

but if I do this:
c='cc'
vars() [b,c]= 10,11

it doesn't successfully assign bb and cc.
I don't understand why, nor how best to do this.
Thanks
PS, several people have asked, quite reasonably, why I wanted to do this.  I found I was setting up a lot of variables and objects according to options specified by the user.  So if the user specified options 2, 3 and 7, I would want to create a2, a3 and 7, plus b2, b3, b7 etc.  It may not be usual practice but using vars and eval is a very easy and transparent way to do it, requiring simple concise code:
For i in input_vector:  vars()['a'+input_vector[i]] = create_a (input_vector[i])
For i in input_vector:  vars()['b'+input_vector[i]] = create_b (input_vector[i])
This works for some of the data.  The trouble is when I use another function, create_c_and_d.  This requires me to compress the above two lines into one function call.  If this can be done easily using dictionaries, I am happy to switch to that method.  I am new to python so it isn't obvious to me whether it can. 

A:

Because b,c is a tuple, so you're actually assiging to the key ('bb', 'cc').
>>> vars() [b,c]= 10,11
>>> vars()[('bb', 'cc')]
(10, 11)

>>> x = b,c
>>> type(x)
<type 'tuple'>

