d = dict.fromkeys(['name', 'age'], '(unknown)') d.get('name', 'N/A') # If the key is there, get works like ordinary dictionary lookup: d = dict.fromkeys(['name', 'age'], '(unknown)') d['name'] = 'Eric' print d.get('name') ddict = {}.fromkeys(('x', 'y'), -1)print ddictedict = {}.fromkeys(('foo', 'bar'))print edict
Name (required)
email (will not be published) (required)
Website