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?
ifstatement without a comparison but it definitely does have a condition. An if statement without a condition would look something like this:if ::-) - paxdiablo