i cant tell, something dont look right with the snippet…but it looks like your defining own.text as the entire dictionary. I dont see where phonebook is being defined but yet you are pulling rachel from it. Is own a text object? maybe something like
phonebook = { "Fred" : "555-1111",
"Alison" : "555-2222",
"George" : "555-3333",
"Rachel" : "555-4444" }
# get Rachel's phone number
number = phonebook["Rachel"]
# print Rachel's phone number
print(number)
#then
textobject["Text"] = number
i have the script attached to the cube and not the text object. The script defines the text object. Also it is set to run only once or you will be defining the dictionary everyframe doing it this way