Examveda

What will be the output of the following Python code?
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

Answer: Option C


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python