Get the first item that is not excluded. Args: list_: List of items exclude: Item to ignore
(list_: list[str], exclude: str)
| 16 | |
| 17 | |
| 18 | def first_exclude(list_: list[str], exclude: str) -> str | None: |
| 19 | """ |
| 20 | Get the first item that is not excluded. |
| 21 | |
| 22 | Args: |
| 23 | list_: List of items |
| 24 | exclude: Item to ignore |
| 25 | """ |
| 26 | return next((x for x in list_ if x != exclude), None) |
no outgoing calls
no test coverage detected