<jupyter_start><jupyter_text>Learning objectives:* How to define tuples and tuples.* Main difference between sets, tuples and lists<jupyter_code>shape = (228, 228, 3)
print(shape)
shape[3]
shape[1:]
shape[1] = 128
## tuple iteration
for dim in shape:
    print(dim)
shape.count(-1)<jupyter_output><empty_output><jupyter_text>Sets<jupyter_code>set1 = set(['laptop', 'bag', 'book', 'laptop', 'book', 'kite'])
set1
for item in set1:
    print(item)
set1.add("cake")
set1
set1.pop()
set1<jupyter_output><empty_output><jupyter_text>Set operators<jupyter_code>seta = set(['card', 'upi', 'paypal', 'cash'])
setb = set(['paypal', 'revolut', 'n26'])

setc = seta | setb
setc
seta & setb
seta.intersection(setb)
seta - setb
seta ^ setb<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16556291390728478, 'fraction_numerical': 0.030463576158940398, 'mean_word_length': 7.042553191489362, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '21862', 'license': 'MIT', 'n_tokens_mistral': 322, 'n_tokens_neox': 304, 'n_words': 67, 'path': 'module_2_programming/tuples_and_sets.ipynb', 'repo_name': 'wiplane/foundations-of-datascience-ml', 'size': '755'}