+ 1

explain why?

any one please explain the output of the program is this programme:m=[ [1,2,3], [4,5,6] ] print(m[0],[1]) output=[1, 2, 3] [1] why this 1?

7th Mar 2021, 4:07 AM
Mitta Mukesh Kumar
Mitta Mukesh Kumar - avatar
2 Answers
+ 2
Notice the comma in the print function. It separates the arguments of the print function with spaces. So, print(m[0] , [1]) first prints m[0] then prints a space, then the second argument which is [1].
7th Mar 2021, 4:32 AM
Abir Hasan
Abir Hasan - avatar
0
Mitta Mukesh Kumar please try these:- programme:[ [1,2,3], [4,5,6] ] print([0],[1])
7th Mar 2021, 4:39 AM
Tanmay Prakash Powar
Tanmay Prakash Powar - avatar