Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
ascii_lowercase, ascii_uppercase solution in Clear category for String-2-Matrix by kurosawa4434
from string import ascii_uppercase as au, ascii_lowercase as al
Row = tuple[int, int, int, int, int]
Grid = tuple[Row, Row, Row, Row, Row]
def converter(text: str) -> Grid:
return tuple(tuple((al[j*5+i] in text.lower()) + (au[j*5+i] in text) for i in range(5)) for j in range(5))
Feb. 8, 2024
Comments: