Title: Code Quiz Time – Can You Answer This?
Post: Question:
What will be the output of this Python code?
Options:
A. [1], [1]
B. [1], [1, 1]
C. Error
D. None of the above
Comment your answer & why!
First 3 correct replies get a shoutout on the channel!
#PythonQuiz #CodeChallenge #StudentsEngage@Projectwithsourcecodes
Post: Question:
What will be the output of this Python code?
def func(x=[]):
x.append(1)
return x
print(func())
print(func())
Options:
A. [1], [1]
B. [1], [1, 1]
C. Error
D. None of the above
Comment your answer & why!
First 3 correct replies get a shoutout on the channel!
#PythonQuiz #CodeChallenge #StudentsEngage@Projectwithsourcecodes