1. Explanation of the exercise: What will the following 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 )
answer:
2. Keyword of function
Third, the parameters of the function
4. Anonymous functions
5. Higher-order functions (used more four sorted )
6. List Builder (Nine Palaces)
list comprehension