3 3 votes Consider the following Python code:info = ["GO", [10, 20, [30, 40]], "DA"] info[1][2][0] = info[1][2][0] + 5 print(info[1][2], info[1][1])What is the output of the code above?[30, 40] 20[35, 40] 20[35, 45] 10[30, 45] 20 Programming in Python goclasses goclasses-da-dpp goclasses-da-dpp-day-200 programming-in-python goclasses-python-&-dsa-practice-questions list output + – GO Classes 153 views answer comment Share Follow Print See all 2 Comments 2 2 Comments reply akash_kumar 9 commented Jun 15 reply Follow flag Today all 5 done & dusted 0 0 replyShare GO Classes commented Jun 16 reply Follow flag @akash_kumar 9 very good!! Consistency = Success. Ready for the next 5? 0 0 replyShare Please log in or register to add a comment.
1 1 vote The list contains another list inside it.info = ["GO", [10, 20, [30, 40]], "DA"]The expression $\texttt{info[1]}$ gives the inner list:[10, 20, [30, 40]]The expression $\texttt{info[1][2]}$ gives the nested list:[30, 40]The expression $\texttt{info[1][2][0]}$ gives $\texttt{30}$.info[1][2][0] = 30 + 5 = 35So $\texttt{info[1][2]}$ becomes $\texttt{[35, 40]}$.Also, $\texttt{info[1][1]}$ is $\texttt{20}$.Therefore, the output is:[35, 40] 20Correct Option: B GO Classes answered Jun 15 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.