Avatar of SiHodgy007
SiHodgy007
Flag for United Kingdom of Great Britain and Northern Ireland asked on

Python Dictionary

I have a variable which outputs

Happy Gilmore
Silly Monkey
Funny Donkey

I would look like to load these into a dictionary so I can use

print(variable.get("Happy"))
Python

Avatar of undefined
Last Comment
SiHodgy007

8/22/2022 - Mon
aikimark

variable = {"Happy": "Happy Gilmore","Silly":"Silly Monkey","Funny":"Funny Donkey"}
print(variable.get("Happy"))

Open in new window

SiHodgy007

ASKER
Sorry the Variable outputs the above, how do I manipulate it into a dictionary. You have just re-wrote the variable.

Get Happy should return Gilmore
ASKER CERTIFIED SOLUTION
SiHodgy007

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SiHodgy007

ASKER
Solved myself
Your help has saved me hundreds of hours of internet surfing.
fblack61