adplus-dvertising
frame-decoration

Question

What will be the output?
data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
 
def ttt(m):
    v = m[0][0]
 
    for row in m:
        for element in row:
           if v < element: v = element
 
    return v
 
print(ttt(data[0]))

a.

1

b.

2

c.

4

d.

5

Posted under Lists in Python Python

Answer: (c).4

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output?