Concatenate list of strings.
(l: list[str], sep: str = '\n')
| 48 | |
| 49 | |
| 50 | def join(l: list[str], sep: str = '\n') -> str: |
| 51 | """Concatenate list of strings.""" |
| 52 | return sep.join(v for v in l if v) |
| 53 | |
| 54 | |
| 55 | def ensure_sep(sep: str, s: str, n: int = 2) -> str: |