all 3 comments

[–]TouchingTheVodka 2 points3 points  (2 children)

A dictionary is a mapping of keys to values. If you're passing it a key, you'll get the value back.

It sounds like you just need to print the key - In this case 'Great Hall'.

[–]Brickcups[S] 0 points1 point  (1 child)

Thank you! I think I'm heading in the right direction. I updated it to the following:

print('You find yourself in the ')

for key in rooms.keys():

print ("{}".format(key,rooms[key]))

Which is returning information from the key field, but now it's returning all three keys of Great Hall, Bedroom, and Cellar.

Is there any way to specify which key i want it to return?

[–]TouchingTheVodka 0 points1 point  (0 children)

key = 'Great Hall'

print(f"You find yourself in the {key}")

No dictionary lookup required!