<jupyter_start><jupyter_text>DAY 2 ASSIGNMENTS  Default functions of each of the Data Types1. List2. Dictionary3. Sets4. Tuple5. String  Default Functions - List<jupyter_code>list_default_function = ["pop", "count", "index", "extend", "clear", "append", "reverse", "remove", "copy", "insert"]
list_default_function<jupyter_output><empty_output><jupyter_text>1. list.reverse<jupyter_code>list_default_function.reverse()
list_default_function<jupyter_output><empty_output><jupyter_text>2. list.extend<jupyter_code>Names = ["Ashok", "Suresh", "Vivek"]
Names
age = [10, 20, 30]
age
Names.extend(age)
Names<jupyter_output><empty_output><jupyter_text>3. list.remove<jupyter_code>numbers = [4, 3, 2, 1]
numbers
numbers.remove(1)
numbers<jupyter_output><empty_output><jupyter_text>4. list.insert<jupyter_code>Country = ["India", "Pakistan", "Bangladesh"]
Country
Country.insert(1, "SriLanka")
Country<jupyter_output><empty_output><jupyter_text>5. list.append<jupyter_code>Country
Country.append ("Russia")
Country<jupyter_output><empty_output><jupyter_text>Default Functions - Dictonary 1. dict.copy<jupyter_code>vehicle = {"Type" : "Car", "Brand" : "Ford", "Color" : "Red"}
vehicle
copy_vehicle = vehicle.copy()
copy_vehicle<jupyter_output><empty_output><jupyter_text>2. dict.get<jupyter_code>vehicle.get("Color")<jupyter_output><empty_output><jupyter_text>3. dict.items<jupyter_code>vehicle.items()<jupyter_output><empty_output><jupyter_text>4. dict.update<jupyter_code>vehicle.update({"Brand" : "Honda"})
vehicle<jupyter_output><empty_output><jupyter_text>5. dict.setdefault<jupyter_code>vehicle.setdefault("Type")<jupyter_output><empty_output><jupyter_text>Default Functions - Sets 1. set.difference<jupyter_code>set1 = {"apple", "orange", "Banana"}
set2 = {"carrot", "ladies finger", "apple"}
set1.difference(set2)<jupyter_output><empty_output><jupyter_text>2. set.issubset<jupyter_code>set1 = {"apple", "orange", "Banana"}
set2 = {"carrot", "ladies finger", "apple"}
set1.issubset(set2)<jupyter_output><empty_output><jupyter_text>3. set.add<jupyter_code>set1.add("Mango")
set1<jupyter_output><empty_output><jupyter_text>4. set.discard<jupyter_code>set2.discard("carrot")
set2<jupyter_output><empty_output><jupyter_text>5. set.clear<jupyter_code>set2.clear()
set2<jupyter_output><empty_output><jupyter_text>Default Functions - Tuple 1. tuple.count<jupyter_code>data = ("Gandhi", "02-10-1869", "Indian", "Male", "Indian")
data
data.count("Indian")<jupyter_output><empty_output><jupyter_text>2. tuple.index<jupyter_code>data.index("Male")<jupyter_output><empty_output><jupyter_text>Default Functions - String 1. str.isprintable<jupyter_code>str1 = " Let's Upgrade "
str1.isprintable()<jupyter_output><empty_output><jupyter_text>2. str.replace<jupyter_code>str2 = "testing"
str2.replace("ing", "ed")<jupyter_output><empty_output><jupyter_text>3. str.strip<jupyter_code>str3 = " You are Most welcome!  "
str3.strip()<jupyter_output><empty_output><jupyter_text>4. str.swapcase<jupyter_code>str4 = "gREAT"
str4.swapcase()<jupyter_output><empty_output><jupyter_text>5. str.upper<jupyter_code>str5 = ("I love LetsUpgrade")
str5.upper()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15948002536461636, 'fraction_numerical': 0.022828154724159798, 'mean_word_length': 11.088122605363985, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 93, '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': '23', 'dir': 'jupyter-structured-clean-dedup', 'id': '635844', 'license': 'Apache-2.0', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1259, 'n_words': 150, 'path': 'Python Day 2 - B7 - Assignments.ipynb', 'repo_name': 'shanshok/LetsUpgrade-Python-B7', 'size': '3154'}