is there other way to do an matematic operational ( add, substract, multiply divided ) from an integer foreach value inside a list ?
for example:
a = 4
arr = list(20,1,5,36,10,31,100)
the a
variable need to substract/multiply/divided to all values inside those list using for
function like below snippet.
ar = []
for x in arr
a = 4*x
ar.append(a)
Is there any a better approach to solve this rather than using for/while loop ?