如何在列表中找到列表中的最大数量?

How to find the maximum number in list in list?

我有列表中的概率再次出现在列表中,我如何从中获得最大数量,在这种情况下它应该 return 0.20 数字。

     [[0.     0.     0.     0.     0.     0.     0.     0.     0.     0.13
      0.     0.     0.     0.1465 0.01   0.     0.     0.     0.     0.
      0.     0.01   0.     0.     0.     0.     0.     0.     0.     0.
      0.02   0.     0.     0.     0.     0.     0.     0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.03   0.     0.01   0.
      0.     0.01   0.     0.01   0.     0.     0.     0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.     0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.     0.     0.     0.
      0.     0.05   0.     0.     0.     0.     0.     0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.     0.     0.     0.
      0.     0.01   0.     0.     0.     0.     0.07   0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.04   0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.     0.01   0.     0.
      0.     0.     0.     0.     0.     0.16   0.     0.     0.     0.
      0.     0.     0.     0.     0.     0.     0.     0.     0.     0.03
      0.     0.     0.     0.     0.2035 0.     0.     0.05   0.    ]]
max(max(x) for x in my_list)

max(sum(my_list, []))

import numpy as np
np.max(my_list)

试试这个 pythonic 解决方案:

max_ = max(max(list_))
print(max_)

它应该给出所需的输出。