Wiki
Books
Shop
Courses
Careers
Change language
English
Italiano
Deutsch
Français
Español
Türk
Русский
Português
Polski
Nederlandse
中文
한국어
日本語
हिन्दी
Python.Engineering
Wiki
如何將列表中的每個元素乘以一個數字?
如何將列表中的每個元素乘以一個數字?
code Python module
|
Python functions
|
re Python module
|
StackOverflow
Michael Zippo
11.03.2022
我有一個列表:
my_list = [1, 2, 3, 4, 5]
如何將<中的每個元素相乘代碼>my_list 5?輸出應該是:
[5, 10, 15, 20, 25]