dict2 = {'name': 'earth', 'port': 80} dict2['name'] print 'host %s is running on port %d' % (dict2['name'], dict2['port'])