Python Project

Hey community! I’m currently writing a program in Python that will take a number and output a single word. I tried to do this using dictionaries and keys but I don’t want the final output to have braces around it, I just want the single word. How would I go about that? Should I set up the options as a list? I’ll provide an example of what I’m trying to accomplish below:

Enter num: 1

Dog

Enter num: 2

Turkey

And so on, I’m planning on having at least 28 words altogether in the program.

I might be mistaking your goal but why not use the usual subscript syntax dict[key]?

1 Like

Perhaps you could show us what you tried. There wouldn’t be braces around the value in a key: value pair if the value is simply a string.

1 Like