If I have a list:
my_list = ['hey', 'how are', 'you', 'Bob', 'Jim']
and I want to remove all elements from the list following:
if 'Bob' in my_list:
print(my_list)
Such that the output is:
my_list = ['hey', 'how are', 'you']
which removes ['Bob', 'Jim']