Why can't I print this matrix? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
16th Aug 2017, 4:41 AM
Nikhil Dugar
Nikhil Dugar - avatar
2 Réponses
+ 2
use print() to print something M=[[1,2,3],[4,5,6],[7,8,9]] print(M)
16th Aug 2017, 5:03 AM
OrbitHv [Inactive]
OrbitHv [Inactive] - avatar
+ 1
do as @Orb_H suggested, only writing the variable name works on Python console, not when you save your code in a file to execute it later (as for what sololearn do, and in fact, every constructed project, as small as it can be, do).
16th Aug 2017, 5:14 AM
Baptiste E. Prunier
Baptiste E. Prunier - avatar