Wednesday, October 10, 2018

Python's json.update() makes me happy

yin = {'Content-Type': 'application/json'}
yang = {'X-Venafi-Api-Key': 'e1636470-bace-4c3a-bd2b-fa4132ca2d4b'}
yin.update(yang)

 
 

yin is going to end up with this in it:

{
   'Content-Type': 'application/json',
   'X-Venafi-Api-Key': 'e1636470-bace-4c3a-bd2b-fa4132ca2d4b'
}

No comments:

Post a Comment