[ad_1]
list = [1,2,3,4,5,6]
for x in range(len(list)):
if list[x] % 3 == 0: list[x] = list[x]**2
print(list)
[ad_2]
solved How to divide specific elements in a list and then square the values? [closed]
[ad_1]
list = [1,2,3,4,5,6]
for x in range(len(list)):
if list[x] % 3 == 0: list[x] = list[x]**2
print(list)
[ad_2]
solved How to divide specific elements in a list and then square the values? [closed]