I have a 2D list. I want to find the max value and its index of each row. Here is the list
q_table = [[0.16, 0.40, 0.61, 0.48, 0.20],
[0.42, 0.79, 0.64, 0.54, 0.52],
[0.64, 0.64, 0.24, 0.93, 0.43],
[0.33, 0.54, 0.61, 0.43, 0.29],
[0.25, 0.56, 0.42, 0.69, 0.62]]
Output:
0.61 2
0.79 1
0.93 3
0.61 2
0.69 3
# I'm using python 3.8
Thank You in Advance