Chapter 7: Dictionaries, Locks, and Gobbledygook

Start Here

Chapter 1: In which a cow surprises you 

Chapter 2: The Time traveling cow

Chapter 3: Greedy banker strings

Chapter 4: More on strings and donkeys

Chapter 5: Crooks R Us Bank & Lists

Chapter 6: Orc functions

Chapter 7: Dictionaries, Locks, and Gobbledygook

Chapter 8: Python vs the Zombies

Chapter 9: The Doggy-Nator and List Comprehensions

Chapter 10: In which you Eval the Doggy



You reach the top, to find the door locked. Rather than kick the door in, like any sane person would do, you decide to use code around the lock. Because… well, just because. Maybe because you are a geek.

There is a special kind of a list called a dictionary. A dictionary has a key and a value. A bit like a normal dictionary. Hell, you can even build a dictionary:

Now if you want to know the meaning of Gobbledygook:

The general format of a dictionary is:
dict = { ‘key 1’: ‘value 1’, ‘key 2’: ‘value 2’}

Where key1 points to value1, key2 to value2, and so on. Why would you want to do that? There are cases when two things are linked, and you want to store both of them together. A very common example is user names and passwords.

Here, user 1 has the password pass1, user 2 has password pass2, and so on. So if you want to see the password for user1, you would type:

While you spend ten minutes writing a Python script to open the door, the Moo-Inator gets bored, and discovers the door was actually open. He goes in, and you follow him.

“Where can the Golden Laptop be? Hidden in a top secret super powerful safe?”

“No. It’s just lying around, covered in chip and chocolate pieces. Looks like someone has been using it to censored to make it safe for work.”

“Do people still censored at work? I thought censored was censored , and only censored censored censored?”

“Well, obviously not.”

“So what do we do with this Golden Laptop? Do we fling it out the window?”

“No. This foul device this cannot be destroyed so easily. It must be cast back into the fires of Eyjafjallajökull, from whence it was created. Any questions?”

“Yes. What does whence mean? And what is Eyjafjallajökull?”


Eyjafjallajökull is pronounced Ayah-Fyat-Lah-Yoh-Kuh-Tul. Go on, say it a few times. It will make you feel good. Get rid of the tension.


Eyjafjallajökull is the reason Iceland doesn’t need an army, not to mention the reason the bankers didn’t screw over Iceland (Iceland was one of few countries that gave the fingers to bankers. Arguing rightly that the taxpayers shouldn’t have to bail out greedy pigs). So why does Eyjafjallajökull save Iceland? Because of this:

Iceland may not have cash, but they have ash
Iceland may not have cash, but they have ash

Incidentally, Iceland is one of the few countries that confuses even Jackie Chan:


Jackie Chan is confused

Leave a Reply

Your email address will not be published. Required fields are marked *