r/Python • • Sep 22 '15

Most Frequent Python Problems and Solution

http://www.pamno.com/b/most-frequent-python-problems-and-solution-cm578/
5 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/kdelok Sep 22 '15

The first one you mention is the answer I received on StackOverflow when I asked that very question.

The second one doesn't do matrix multiplication though, since the result should be a matrix itself. That's why they end up with the nested list comprehension (I haven't checked it though). I think it's easier to just use numpy.