+ 1
What does this code output:
def f(x,l=[]): for i in range(x): l.append(i*i) print(l) f(2) f(3,[3,2,1]) f(3)
5 Respuestas
+ 1
Mayur Shetty
f(2) = [0,1]
f(3,[3,2,1]) = [3,2,1,0,1,4]
f(3) = [0,1,4]
Note:: I may have answered your question, but it's not appropriate to post such questions on Q&A forum.
This is a place for programming questions, not quizzes
0
f(2)=[0, 1]
f(3,[3,2,1])=[3, 2, 1, 0, 1, 4]
f(3)=[0, 1, 0, 1, 4]
0
What does this code output?
0
What does this code output? Print (1+2+3)
0
What does this code output?