(ids, ids_to_strip)
return ids
Strip ids_to_strip from the end IDs.
Strip ids_to_strip from the end IDs.
Strip ids_to_strip from the end IDs .
def strip_ids(ids, ids_to_strip):
  """Strip ids_to_strip from the end IDs."""
  ids = list(ids)
  while ids and ids[-1] in ids_to_strip:
    ids.pop()
  return ids
def strip_ids ( ids , ids_to_strip ) : ids = list ( ids ) while ids and ids [ - 1 ] in ids_to_strip : ids . pop ( ) return ids