Closed mathieugouin closed 3 years ago
Same here:
# Transform into a list:
[mx[row][col] for row in range(len(mx)) for col in range(len(mx[0]))] # [1,2,3,4]
Thanks for catching this one! Would you mind submitting a pull request so you get the credit for the change?
Sure no problem!
Mathieu On Dec 19, 2020 6:34 AM, "Andrei Neagoie" notifications@github.com wrote:
Thanks for catching this one! Would you mind submitting a pull request so you get the credit for the change?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aneagoie/ztm-python-cheat-sheet/issues/16#issuecomment-748461858, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYG2PT6S2LMBTAEJDWKUTTSVSFURANCNFSM4VB7MNWQ .
Refer to PR #17.
Thanks!
Hello, very nice cheat sheet by the way :)
I just found a small bug:
The column for loop should be like this:
for col in range(len(mx[0])):
It works by chance, because you matrix is 2 x 2 :)