Use variable as a key : Dictionary Key : Dictionary PYTHON examples


PYTHON examples » Dictionary » Dictionary Key »

 

Use variable as a key


Use variable as a key
 
table = {'Python':  'Guido van Rossum',
          'Perl':    'Larry Wall',
          'Tcl':     'John Ousterhout' }

language = 'Python'
creator  = table[language]
print creator



           
         
  



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Dictionary
» Dictionary Key