(l: list[Any], n: int = 1)
| 31 | |
| 32 | |
| 33 | def reshape(l: list[Any], n: int = 1) -> list[list[Any]]: |
| 34 | assert len(l) % n == 0 |
| 35 | columns = [[] for i in range(n)] |
| 36 | for i, x in enumerate(l): |
| 37 | columns[i % n].append(x) |
| 38 | return zip(*columns) |
| 39 | |
| 40 | |
| 41 | def isint(x: str) -> bool: |
no outgoing calls
no test coverage detected