I am trying to iterate through an array (or tuple, etc.) and want to remove certain items if they meet my criteria. The output could a modified array or a new array altogether if I can't modify the existing object I am iterating through.
for item in simple_array
if some_condition
add_to_new_array(item) # or remove from my existing array
end
end