What Will Be The Output Of The Following Python Codep Pre #410
What will be the output of the following Python code?</p> <pre><code class="language-python"> def change(var, lst): var = 1 lst[0] = 44 k = 3 a = [1, 2, 3] change(k, a) print(k) print(a) </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Lists - Python Lists - Quiz No.8.
What will be the output of the following Python code?
def change(var, lst): var = 1 lst[0] = 44 k = 3 a = [1, 2, 3] change(k, a) print(k) print(a)
3 [44, 2, 3]
1 [1,2,3]
3 [1,2,3]
1 [44,2,3]