<jupyter_start><jupyter_text>Remove 1 specific letter from list<jupyter_code>Liste = ['vbg', 'vkb', 'vv', 'vbj', 'vz'] #the list continues 


print([s.strip('v') for s in Liste]) # remove the 8 from the string borders
print([s.replace('v', '') for s in lst]) # remove all the 8s<jupyter_output>['bg', 'kb', '', 'bj', 'z']
['bg', 'kb', '', 'bj', 'z']<jupyter_text>Remove last string in Liste<jupyter_code>Liste = ['vbg', 'vkb', 'vv', 'vbj', 'vz']

NewListe = Liste[:-1]

print(NewListe)<jupyter_output>['vbg', 'vkb', 'vv', 'vbj']<jupyter_text>Add +1 or Characters for each element in Liste<jupyter_code>x = [1, 2, 3, 4, 5]

for i in range(len(x)):
     x[i] += 1

print(x)
y = ['a','b','c']

for i in range(len(y)):
     y[i] += '######'

print(y)<jupyter_output>['a######', 'b######', 'c######']<jupyter_text>Unique values in 2D array<jupyter_code>import numpy as np
b = np.array([[1, 1, 0], [1, 1, 0], [2, 2, 4]])
np.unique(b, axis=1)<jupyter_output><empty_output><jupyter_text>Iterating over a list with string + integer<jupyter_code>d = [('red', 1), ('blue', 2), ('green', 3)]

for value in d: 
    word = value[0]
    value = value[1]
    print(word, value)
    
print('______________________')    
    
for value in d: 
    word = value[0]
    value = value[1]
    print("Word: {:}, Value: {:}".format(word , value))<jupyter_output>red 1
blue 2
green 3
______________________
Word: red, Value: 1
Word: blue, Value: 2
Word: green, Value: 3
{'fraction_non_alphanumeric': 0.2176022176022176, 'fraction_numerical': 0.024255024255024255, 'mean_word_length': 4.846153846153846, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '146785', 'license': 'MIT', 'n_tokens_mistral': 621, 'n_tokens_neox': 587, 'n_words': 158, 'path': 'LISTS ___ Add+Remove___ (EXAMPLES).ipynb', 'repo_name': 'MaximilianFreitag/JupyterNotebooks', 'size': '1443'}