<jupyter_start><jupyter_text>List<jupyter_code>list1=[1, "George", 4.5, "A"]
list1.append(6)
print(list1)
list1.insert(2,2020)
print(list1)
list1.pop(1)
print(list1)
print(list1.index(4.5))
list1.remove("A")
print(list1)<jupyter_output>[1, 'George', 4.5, 'A', 6]
[1, 'George', 2020, 4.5, 'A', 6]
[1, 2020, 4.5, 'A', 6]
2
[1, 2020, 4.5, 6]<jupyter_text>Dictionary<jupyter_code>d1={"apple":"red", "pineapple":"yellow", "watermelon":"green","grapes":"violet"}
print(d1.get("apple"))
print(d1.items())
print(d1.keys())
print(d1.values())
d1.update({"orange":"orange"})
print(d1)<jupyter_output>red
dict_items([('apple', 'red'), ('pineapple', 'yellow'), ('watermelon', 'green'), ('grapes', 'violet')])
dict_keys(['apple', 'pineapple', 'watermelon', 'grapes'])
dict_values(['red', 'yellow', 'green', 'violet'])
{'apple': 'red', 'pineapple': 'yellow', 'watermelon': 'green', 'grapes': 'violet', 'orange': 'orange'}<jupyter_text>Set<jupyter_code>s={"apple", 3, 1,"grape", "banana", 4.5}
s.add("orange")
print(s)
s.discard(3)
print(s)
s.remove("grape")
print(s)
s1={1,6,9,4,"apple"}
print(s.union(s1))
print(s.intersection(s1))<jupyter_output>{1, 3, 4.5, 'orange', 'apple', 'grape', 'banana'}
{1, 4.5, 'orange', 'apple', 'grape', 'banana'}
{1, 4.5, 'orange', 'apple', 'banana'}
{1, 4.5, 4, 6, 'orange', 'apple', 9, 'banana'}
{1, 'apple'}<jupyter_text>Tuple<jupyter_code>t=(1,2,3,4,5,2,4)
print(t.count(2))
print(t.index(5))
print(min(t))
print(len(t))
print(5 in t)<jupyter_output>2
4
1
7
True<jupyter_text>String<jupyter_code>s1="Lets Upgrade"
print(s1.casefold())
print(s1.find("U"))
print(s1.count("e"))
print(s1.upper())
print(s1.split())<jupyter_output>lets upgrade
5
2
LETS UPGRADE
['Lets', 'Upgrade']
{'fraction_non_alphanumeric': 0.2673733804475854, 'fraction_numerical': 0.06419316843345112, 'mean_word_length': 9.359756097560975, 'pattern_counts': {'":': 5, '<': 16, '<?xml version=': 0, '>': 16, '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': '78212', 'license': 'Apache-2.0', 'n_tokens_mistral': 847, 'n_tokens_neox': 789, 'n_words': 131, 'path': 'Day 2.ipynb', 'repo_name': 'ArbeenaAzeeb/LetsUpgrade-Python', 'size': '1698'}