hpcflow.sdk.core.utils.ensure_in#

hpcflow.sdk.core.utils.ensure_in(item, lst)#

Get the index of an item in a list and append the item if it is not in the list.

Parameters:
  • item (T)

  • lst (list[T])

Return type:

int