Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if the value is not in dict return default

dictionary = {"message": "Hello, World!"}

data = dictionary.get("message", "")

print(data)  # Hello, World!
Source by docs.quantifiedcode.com #
 
PREVIOUS NEXT
Tagged: #dict #return #default
ADD COMMENT
Topic
Name
8+9 =