How to add new keys to a Python dictionary

How to add new keys to a Python dictionary

We cover three basic ways to add keys to dictionary: myDict['key'] = value myDict.update(newKeys) myDict |= newKeys