I have 2 lists. I only want to append to the new list after I've reached the specified value.
old_list = ['apple', 'pear','orange', 'banana', 'grape']
new_list = []
value = 'orange'
The desired outcome is:
new_list = ['banana', 'grape']
I've tried this, but the result is not what I want:
for i in old_list:
if i != value:
new_list.append(i)
Hope that makes sense!