What Will Be The Output Of The Following Python Codep Pre #453
What will be the output of the following Python code?</p> <pre><code class="language-python">r = [11, 12, 13, 14, 15, 16, 17, 18, 19] A = [[0, 10, 20], [30, 40, 50], [60, 70, 80]] for row in A: for col in row: r.append(col+10) r</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 List Comprehension - Python Matrix List Comprehension - Quiz No.1.
What will be the output of the following Python code?
r = [11, 12, 13, 14, 15, 16, 17, 18, 19] A = [[0, 10, 20], [30, 40, 50], [60, 70, 80]] for row in A: for col in row: r.append(col+10) r
[11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 20, 30, 40, 50, 60, 70, 80, 90]
[10, 20, 30, 40, 50, 60, 70, 80, 90]
[11, 12, 13, 14, 15, 16, 17, 18, 19]
[0, 10, 20, 30, 40, 50, 60, 70, 80]