📜  python listas por comprension - Python 代码示例

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

代码示例1
>>> numeros = [1, 2, 3, 4]
>>> cuadrados = [num ** 2 for num in numeros]
>>> print(cuadrados)
[1, 4, 9, 16]