refactor user_signup_session.py
This commit is contained in:
@@ -27,5 +27,9 @@ def list_to_matrix(lst: list[int], cols: int) -> list[list[int]]:
|
||||
return [lst[i:i + cols] for i in range(0, len(lst), cols)]
|
||||
|
||||
|
||||
def matrix_transpose(interface: list[list[int]]) -> list[list[int]]:
|
||||
return [list(row) for row in zip(*interface)]
|
||||
|
||||
|
||||
def int_array_to_bytes(int_arr: list[int], byte_size: int = 2) -> bytes:
|
||||
return b"".join([numb.to_bytes(byte_size, byteorder='big') for numb in int_arr])
|
||||
|
||||
Reference in New Issue
Block a user