Python Dictionary - Not In Function

key not in dict

Method Overview:


This method checks whether a given key is not present in the python dictionary. If the key is not present returns TRUE else returns FALSE.




>>> EnvironmentDictionary = {'path': '/bin:/opt/bin'}


>>> if 'path' not in EnvironmentDictionary:       


...          print('Path is not set')


     >>> else


     ...          print('Path is set')




     Path is Set


Copyright 2023 ©