Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to create a dictionary in python

#create an empty dictionary
my_dictionary = {}

print(my_dictionary)

#to check the data type use the type() function
print(type(my_dictionary))

#output

#{}
#<class 'dict'>
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #create #dictionary #python
ADD COMMENT
Topic
Name
8+9 =