<jupyter_start><jupyter_text>print(f"the value for {key} is{trading_pnl[key]")<jupyter_code>closing_prices


#closing
closing_prices = closing_prices[1:]
closing_prices
new_dict={}
for i in range (0,len(closing_prices)):
    new_dict[i+1]=closing_prices[i]
new_dict
# Dictionary of Dicts
stocks_nested_dict = {
    "APPL": {
        "name": "Apple",
        "exchange": "NASDAQ",
        "market_cap": 937.7
    },
    "MU": {
        "name": "Micron Technology",
        "exchange": "NASDAQ",
        "market_cap": 48.03
    },
    "AMD": {
        "name": "Advanced Micro Devices",
        "exchange": "NASDAQ",
        "market_cap": 29.94
    },
    "TWTR": {
        "name": "Twitter",
        "exchange": "NASDAQ",
        "market_cap": 26.42
    }
}
stocks_nested_dict['APPL']['market_cap']= 999
stocks_nested_dict
for ticker in stocks_nested_dict.keys():
    print(stocks_nested_dict[ticker]['market_cap'])
def add_two(x):
    y=x+2
    return y
add_two(3)
add_two(4)
def get_market_cap(ticker):
    return stocks_nested_dict[ticker]['market_cap']
get_market_cap('APPL')
# List of Lists
ceo_nested_list = [
    ["<NAME>", 88, "CEO of Berkshire Hathaway"],
    ["<NAME>", 55, "CEO of Amazon"],
    ["<NAME>", 91, "Professor of Finance"]
]
ceo_nested_list[0][1]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16435185185185186, 'fraction_numerical': 0.02546296296296296, 'mean_word_length': 3.6823104693140793, 'pattern_counts': {'":': 16, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '93371', 'license': 'MIT', 'n_tokens_mistral': 542, 'n_tokens_neox': 496, 'n_words': 93, 'path': 'PythonJupyterNotebooks/Week2-Day2-Student2-Python2.2classnote-Acitivity2.ipynb', 'repo_name': 'nomadic-me/CodingCheatSheets', 'size': '1316'}