1a_list = [1, 2, 3]
2
3a_list = [item * 2 for item in a_list]
4
5print(a_list)
6OUTPUT
7[2, 4, 6]
1my_list = [1, 2, 3, 4, 5]
2my_new_list = [i * 5 for i in my_list]
3
4>>> print(my_new_list)
5[5, 10, 15, 20, 25]
1a_list = [1, 2, 3]
2
3multiplied_list = [element * 2 for element in a_list]
4
5# [2, 4, 6]
1import numpy as np
2
3list1 = [1,2,3,4,5]
4result = np.prod(list1)
5
6print(result)
7>>>120
8