import pandas as pd

# Keyword Method with iterrows()
# {new_key:new_value for (index, row) in df.iterrows()}

data = pd.read_csv("nato_phonetic_alphabet.csv")

# TODO 1. Create a dictionary in this format:
letter_code = {row.letter: row.code for index, row in data.iterrows()}


# TODO 2. Create a list of the phonetic code words from a word that the user inputs.
user_word = input("Enter a word: ").upper()
phonetic_code_words = [letter_code[letter] for letter in user_word]
print(phonetic_code_words)
