Use list comprehension with matrixes | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Use list comprehension with matrixes

How to make use of list comprehension with these matrixes? I'm learning about matrixes so any useful information is appreciated 😁 https://code.sololearn.com/cA16A5A512a1/?ref=app

4th Jun 2021, 4:31 AM
Jace🎭
Jace🎭 - avatar
1 Antwort
+ 4
matriz = [[1 if i>=j else 0 for j in range(6)] for i in range(6)] matrix_b = [[5 if f==2 and c==1 else 0 for c in range(3)] for f in range(5)]
4th Jun 2021, 4:46 AM
visph
visph - avatar