def f1(x,y):
if x:
x = [1,2,3]
x.append(4)
else:
x = 2
return x + y
L1 = [1,2,3]
L2 = [55,66]
L3 = []
y = 3
print( f1(L3,y) ) # Line 1
print( L3 ) # Line 2
print( f1(L1,L2) ) # Line 3
print( L1 ) # Line 4
#I want to understand this expression, what is it saying? what does "if x:" means? usualy there is always a condition after the if statement, but this one doesn have one. how do I make sense of this? and what is it doing in this fuction?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…