String Formatting with Dictionaries : Dictionary Print « Dictionary « Python






String Formatting with Dictionaries

String Formatting with Dictionaries

phonebook = {'A': '777-7777', 'B': '222-2222', 'C': '333-3333'}
print "C's phone number is %(C)s." % phonebook
           
       

Related examples in the same category