Use list comprehension with matrixes | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
+ 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