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

Practice with list comprehension

Now I'm trying to pass the code that's in lines 32-38 to list comprehension 🤔 https://code.sololearn.com/ca179a194a24/?ref=app

6th Jun 2021, 2:38 AM
Jace🎭
Jace🎭 - avatar
2 Antworten
+ 3
m1 = [ [int(val >= prom) for val in row] for row in m1 ] [print(*row) for row in m1]
6th Jun 2021, 2:56 AM
visph
visph - avatar
+ 1
I thought it was going to be a long line but it looks so clean 😭 now I want to improve in this subject even more
6th Jun 2021, 3:21 AM
Jace🎭
Jace🎭 - avatar