<jupyter_start><jupyter_text>Equality and identity<jupyter_code>r = [1, 2, 3, 4]
s = [1, 2, 3, 4]

print(f"r == s: {r == s}")
print(f"r is s: {r is s}")
print(f"if of r is {id(r)} while id of s is {id(s)}")<jupyter_output>r == s: True
r is s: False
if of r is 2214183626888 while id of s is 2214183627144<jupyter_text>Everything is an object<jupyter_code>import words
print(type(words))
print(dir(words))

print(type(words.fetch_words))
print(dir(words.fetch_words))<jupyter_output><class 'module'>
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'fetch_words', 'main', 'print_items', 'sys', 'urlopen']
<class 'function'>
['__annotations__', '__call__', '__class__', '__closure__', '__code__', '__defaults__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__globals__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__kwdefaults__', '__le__', '__lt__', '__module__', '__name__', '__ne__', '__new__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
{'fraction_non_alphanumeric': 0.19897084048027444, 'fraction_numerical': 0.029159519725557463, 'mean_word_length': 8.1171875, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '464370', 'license': 'MIT', 'n_tokens_mistral': 503, 'n_tokens_neox': 482, 'n_words': 109, 'path': '03.ObjectsAndTypes.ipynb', 'repo_name': 'yuriy-wellsky/Learning-Python', 'size': '1166'}