Page 1 of 1

Python erstellt Matrix [geschlossen]

Posted: 23 Dec 2024, 18:41
by Anonymous
Ich möchte den Code schreiben, der jedes Element des angegebenen Textes als 64x64-Matrix in ein Array überträgt.
def matrixOlustur(data):
matrix = []
matrix2 = []
i = 0
j = 0

while data != None:
while i < 64:
while j < 64:
for harf in data:
matrix2[j] = harf
j += 1

data = open("data.txt")

matrix = matrixOlustur(data)

print(matrix)

Mein Code sieht so aus, aber ich weiß nicht, wie das geht.