Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python set python key default

# general syntax; default can be anything
dict.setdefault(key[, default])

# Example:
dict_ = {}
dict_.setdefault('mykey', {})
print(dict_)
# {'mykey': {}}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #python #set #python #key #default
ADD COMMENT
Topic
Name
3+5 =