<jupyter_start><jupyter_text>LAK19 - Python Bootcamp Module: Basic Python Instructors: <NAME>, <NAME> Teaching Assistants: <NAME>, Kim  For Loops<jupyter_code>authors = ['<NAME>','<NAME>','<NAME>',\
           '<NAME>','<NAME>','<NAME>',\
           '<NAME>','<NAME>']
# print authors in our list 
for author in authors:
    print(author)
# print last name of authors in our list
for author in authors:
    print(author.split()[1])
# create a new list with length of names in our list
lengths=[]
for author in authors:
    lengths.append(len(author))
lengths
# we create a dictionary. key is author. value is list of their works in our library.
lib = {'<NAME>': ['The World of Yesterday'],
       '<NAME>': ['Hamlet','Othello','<NAME>','<NAME>'],
       '<NAME>': ['Wallenstein','On the Aesthetic Education of Man'],
       '<NAME>' : ['<NAME>'],
       '<NAME>': ['Unconsoled'],
       '<NAME>': ['To the Lighthouse']}
# iterate through the dictionary and print key, value pair
for k,v in lib.items():
    print(k,v)
# iterate through the dictionary and print the author and the first work in the list
for k,v in lib.items():
    print(k,":",v[0])
# iterate through dictionary, print author and the number of books we have for that author
for k,v in lib.items():
    print(k,":",len(v))
# iterate through the dictionary and create a new list of all the books in the library
my_books =[]
for k,v in lib.items():
    my_books.extend(v)
my_books<jupyter_output><empty_output><jupyter_text>While Loop<jupyter_code>i=0
while (authors[i]!="<NAME>"):
    print(authors[i])
    i=i+1<jupyter_output><NAME>
<NAME>
<NAME>
<NAME>
<NAME>
{'fraction_non_alphanumeric': 0.15990159901599016, 'fraction_numerical': 0.0036900369003690036, 'mean_word_length': 4.334426229508197, 'pattern_counts': {'":': 2, '<': 34, '<?xml version=': 0, '>': 34, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '457500', 'license': 'MIT', 'n_tokens_mistral': 548, 'n_tokens_neox': 541, 'n_words': 184, 'path': 'BasicPython/3-Iteration.ipynb', 'repo_name': 'walshkc/lak19', 'size': '1844'}