<jupyter_start><jupyter_text>Python Tuples * Tuples are similar to lists, in that, they can contain an ordered sequence of objects* However, tuples are immutable. Which means, once created, you cannot add or remove items from a tuple.  Creating an empty tupleAn empty tuple can be created by just an empty pair of parens: ()<jupyter_code>empty_tuple = ()
print empty_tuple<jupyter_output>()<jupyter_text>You cannot add item to the tuple<jupyter_code>empty_tuple.append(1)
dir(tuple)<jupyter_output><empty_output><jupyter_text>Creating tuple with values<jupyter_code>tuple1 = (1, 2, 4)
print tuple1<jupyter_output>(1, 2, 4)<jupyter_text>Reading values from TuplesReading values from tuples is similar to that of lists<jupyter_code>print tuple1[0]
print tuple1[-1]<jupyter_output>4<jupyter_text>Length of tuple<jupyter_code>print len(empty_tuple)
print len(tuple1)<jupyter_output>0
3
{'fraction_non_alphanumeric': 0.08399545970488081, 'fraction_numerical': 0.019296254256526674, 'mean_word_length': 7.82, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '38269', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 311, 'n_tokens_neox': 298, 'n_words': 93, 'path': 'notebooks/Tuples.ipynb', 'repo_name': 'abhinav-upadhyay/intro-to-python', 'size': '881'}