human
Give me a Python function to lookup value based on key.
assistant
Here is a Python function to lookup value based on key values

import random

def lookup_value(dictionary, key):
    """Lookup value based on key."""
    return dictionary[key]

# Enter the dictionary
dictionary = {'key1': 'value1', 'key2': 'value2'}

# Enter the key
key = 'key1'

# Calling the function
print((lookup_value(dictionary, key)))

#Example Output
# value1

#Remember to inspect code for bugs.