1 | initial version |

You have probably mistyped your attempt, which gives *another* error....

2 | No.2 Revision |

You have probably mistyped your attempt, which gives *another* error....

After a few guesses, I *supposed* that you meant :

```
def vbl(c,ex):
l=len(c)
V=1
for i in range(l):
V=V*(c[i]**ex[i])
return V
```

which gives :

```
sage: vbl([x, y, z],[2, 3, 4])
x^2*y^3*z^4
```

but :

```
sage: vbl(["x, y, z"],[2, 3, 4])
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
[ Snip... ]
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
```

`[x, y, z]`

is a list of three symbolic variables, but `["x, y, z"] is a list of one string...

Note :

```
sage: prod(map(lambda a,b:a**b,[x, y, z],[2, 3, 4]))
x^2*y^3*z^4
```

Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.