Mega Code Archive

 
Categories / Python / Dictionary
 

Use variable as a key

table = {'Python':  'Guido van Rossum',           'Perl':    'Larry Wall',           'Tcl':     'John Ousterhout' } language = 'Python' creator  = table[language] print creator