D
Size: a a a
A
AS
M
def make_actions():1) Почему переменная acts является списком?
acts = []
for i in range(5):
acts.append(lambda x, i=i: i ** x)
return acts
acts = make_actions()
print(type(acts))
print(acts[0](2))
print(acts[1](2))
print(acts[2](2))
print(acts[4](2))
M
print(acts[4](2))почему происходит 4 возведение в степень 2, ведь запись acts[4] означает что список из пяти элементов, а не элемент равен значению 4
SA
def make_actions():1) Почему переменная acts является списком?
acts = []
for i in range(5):
acts.append(lambda x, i=i: i ** x)
return acts
acts = make_actions()
print(type(acts))
print(acts[0](2))
print(acts[1](2))
print(acts[2](2))
print(acts[4](2))
SA
def make_actions():1) Почему переменная acts является списком?
acts = []
for i in range(5):
acts.append(lambda x, i=i: i ** x)
return acts
acts = make_actions()
print(type(acts))
print(acts[0](2))
print(acts[1](2))
print(acts[2](2))
print(acts[4](2))
DZ
SA
print(acts[4](2))почему происходит 4 возведение в степень 2, ведь запись acts[4] означает что список из пяти элементов, а не элемент равен значению 4
DZ
M
DZ
DZ