<jupyter_start><jupyter_text>Data Type Lists Built-in data container-like type<jupyter_code>odds = [1, 3, 5, 7]
print('odds are: ', odds)
print('first element', odds[0])
print('last element', odds[-1])
names = ['Curie', 'Darwing', 'Turing']
print('names is originally: ', names)
names[1] = 'Darwin'
print('final names is: ', names)
name = names[1]
print(name)
print('the first letter in name is: ', name[0])
name[0] = 'd'
name = 'darwin'# overwrite
name = 'Darwin'
print(name.lower())# casefolding
print(name)
name = 'Darwin'
#name = 'darwin'
name_casefold = name.lower()
salsa = ['peppers', 'onions', 'cilantro', 'tomatoes']
my_salsa = salsa
salsa[0] = 'hot peppers'
print('What is in my salsa', my_salsa)<jupyter_output>What is in my salsa ['hot peppers', 'onions', 'cilantro', 'tomatoes']<jupyter_text>Nested lists<jupyter_code>fridge = [['pepper', 'squash', 'onion'], ['milk', 'eggs', 'cheese'], ['ham', 'sausage', 'bacon']]
print(fridge)
print(fridge[0])
print(fridge[-1])
print(fridge[0][0][0])
print(fridge[0] + fridge[-1])
print('get a "p": ', fridge[0][0][0])<jupyter_output>[['pepper', 'squash', 'onion'], ['milk', 'eggs', 'cheese'], ['ham', 'sausage', 'bacon']]
['pepper', 'squash', 'onion']
['ham', 'sausage', 'bacon']
p
['pepper', 'squash', 'onion', 'ham', 'sausage', 'bacon']
get a "p":  p
{'fraction_non_alphanumeric': 0.2340752110514198, 'fraction_numerical': 0.016116653875671526, 'mean_word_length': 7.253164556962025, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, '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': '207653', 'license': 'MIT', 'n_tokens_mistral': 563, 'n_tokens_neox': 528, 'n_words': 130, 'path': 'examples/data-type-list.ipynb', 'repo_name': 'supplyandcommand/bootcamp-py-101', 'size': '1303'}