Python Question?

I’m reading a book on beginner’s python programming…can someone tell me why this simple program isn’t working?

me = {
    "height": "6",
    "fav_color": "red",
    "fav_author": "Orwell"
}

answer = input("Type height, fav_color or fav_author")
if answer in me:
    result = me[answer]
print(result)

What am I missing here?

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.

What problems are you having with this code?

are you coding in python 2.x or 3.x?

What are you hoping print(result) will return?

that’s why I was asking :slight_smile: if this is Python 2 then there should be raw_input()