📜  python 减法列表 - Python 代码示例

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

代码示例1
# Example usage using list comprehension:
list_a = [1, 2, 3]
list_b = [1, 1, 1]
[a_i - b_i for a_i, b_i in zip(list_a, list_b)]
--> [0, 1, 2]