<jupyter_start><jupyter_text>Heading 1<jupyter_code>spam = {'color': 'red', 'age': 42}
print("keys are: " + str(list(spam.keys()) ))
print('values are: ' + str( list(spam.values())) )
print('items are: ' + str( list(spam.items())))
print('the color of spam is: '+ spam['color'])<jupyter_output>keys are: ['color', 'age']
values are: ['red', 42]
items are: [('color', 'red'), ('age', 42)]
the color of spam is: red<jupyter_text>Find a key given a value[reference page](https://stackoverflow.com/questions/8023306/get-key-by-value-in-dictionary)Get the value of a key given a certain value.  A non standard use of dictionary<jupyter_code>a = {'a':1,'b':2,'c':3, 'd':3}
{k:v for k, v in a.items() if v == 3}

a = {'a':1,'b':2,'c':3, 'd':3}
p = dict(zip(a.values(),a.keys()))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2272159800249688, 'fraction_numerical': 0.02871410736579276, 'mean_word_length': 6.097345132743363, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '161814', 'license': 'MIT', 'n_tokens_mistral': 334, 'n_tokens_neox': 315, 'n_words': 79, 'path': 'Joshs weird stuff.ipynb', 'repo_name': 'OSHI7/Jupyter', 'size': '801'}