<jupyter_start><jupyter_text>removing the item from list  removing by INDICES<jupyter_code># using pop function of list
# syntax : list_name.pop(index)

num = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
num.pop(5)<jupyter_output><empty_output><jupyter_text>removing by item<jupyter_code># we use remove inbuilt function
#syntax. <list_name>.remove(<list_element>)
# it removes first the elements matched

# num = range(0, 5) 
num = [25, 1, 4, 9, 16, 25, 25, 36]
num.remove(25)
print(num)
# some sophisticated and easy example
names = ["Rose", "Lily", "Iris", "Magenta", "Magenta"]
names.remove("Magenta")
print(names)
# removing the duplicates
names = ["Rose", "Rose", "Rose",  "Lily",  "Lily",  "Lily",  "Lily",  "Lily" "Iris", "Magenta", "Magenta"]
names<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16817593790426907, 'fraction_numerical': 0.03622250970245795, 'mean_word_length': 5.972972972972973, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '298470', 'license': 'MIT', 'n_tokens_mistral': 333, 'n_tokens_neox': 304, 'n_words': 85, 'path': '08. Python Lists/7. Deleting elements.ipynb', 'repo_name': 'penanrajput/PythonCourseContent', 'size': '773'}