Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Convert dictionary to string

# a dictionary
dictionary = {1: "A", 2: "B", 3: "C"}
print("Dictionary: ", dictionary, " type: ", type(dictionary))
# calling upon str() to convert dict to string
string = str(dictionary)
print("Dict into stringa: " + string + " type ", type(string))
Source by favtutor.com #
 
PREVIOUS NEXT
Tagged: #Convert #dictionary #string
ADD COMMENT
Topic
Name
3+3 =