0
Calculate with list
For example, i have list[2,4,8,7] and i want to add the value 3 in each element of list. So how can i do? Thanks you advance
3 odpowiedzi
+ 2
a = [2, 4, 8, 7]
for i in range(len(a)):
a[i] += 3
print(a)
0
i can help you in c
if this array u can use for loops and add 3 to each one
0
Maybe my question is not right, sorry. I pass a test that show to test element odd and even of list: if ... (list)%2 == 0. I must complete this blank