<jupyter_start><jupyter_text>Mutable vs. Immutable > Some things can be changed, some things cannot. There's a reason we'd want to set a variable and never have it change: performance, or data integrity.<jupyter_code>food = ['Eggs', 'Milk', 'Bread']
food
food.append("Chocolate")
food
grammas_list = ('Flour', 'Butter',)
grammas_list 
name = "Kalob"<jupyter_output><empty_output><jupyter_text>Above, we set the var `name` to be `Kalob`<jupyter_code>name = "Zephyr"<jupyter_output><empty_output><jupyter_text>Above, we overwrite `name` with a new variable that happens to also be called `name`. Confusing at first, but that happens because Strings (sentences) are Immutable, they cannot be changed.<jupyter_code>name
name.upper()
name = name.upper() 
name<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11352040816326531, 'fraction_numerical': 0.0, 'mean_word_length': 6.929292929292929, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 14, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '220854', 'license': 'MIT', 'n_tokens_mistral': 272, 'n_tokens_neox': 263, 'n_words': 85, 'path': '090_Mutable_vs_Immutable.ipynb', 'repo_name': 'PacktPublishing/Python-for-Everybody-The-Ultimate-Python-3-Bootcamp', 'size': '784'}