📜  python 将列表乘以标量 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:50.846000             🧑  作者: Mango

代码示例2
my_list = [1, 2, 3, 4, 5]
my_new_list = [i * 5 for i in my_list]

>>> print(my_new_list)
[5, 10, 15, 20, 25]