<jupyter_start><jupyter_text>Watch Me Code 1: List Basics<jupyter_code>colors = [] #empty list
type(colors)
dir(colors)
help(colors.index)
colors.append("orange")
colors.append("blue")
colors.append("green")
colors.append("white")
print(colors)
print(len(colors))
colors.remove("green")
print(colors)
#lists are mutable
colors.reverse()
colors
index = colors.index('blue')
print(index)
colors.index('brown') # ValueError<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1622222222222222, 'fraction_numerical': 0.0022222222222222222, 'mean_word_length': 9.738095238095237, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '91419', 'license': 'MIT', 'n_tokens_mistral': 158, 'n_tokens_neox': 155, 'n_words': 29, 'path': 'content/lessons/08/Watch-Me-Code/WMC2-List-Functions.ipynb', 'repo_name': 'MahopacHS/spring-2020-oubinam0717', 'size': '450'}