<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Started answering... now I'm asking! lol<br><br>I've tried to use dict() to create a dictionary to use like the switch statement providing variable names instead of literals, such as:<br><br>>>> a='A'<br>>>> b='B'<br>>>> {a:0,b:1}    #here the variables are resolved<br>{'A': 0, 'B': 1}<br><br>That's ok! But if I use dict() declaration:<br><br>>>> dict(a=0,b=1)<br>{'a': 0, 'b': 1}    #here variable names are taken as literals<br><br>What's going on? Is there a way to make dict() to resolve the variables?<br><br>                                         </div></body>
</html>