We have a list item_list,
item_list
item_list = [\"a\", \"b\", \"XYZ\", \"c\", \"d\", \"e\", \"f\", \"g\"]
We iterate over its items with a
I'd probably write it out like this, personally:
xyz_i = item_list.index('XYZ') do_something('XYZ') #or do_something(item_list[xyz_i]) but.. just save yourself the list lookup for x in item_list[xyz_i+4:]: do_something_else(x)