Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

soustraire deux listes python

>>> a = [1, 2, 3, 4, 5]
>>> b = [7, 8, 9, 1, 2]
>>> c = [b_elt - a_elt for a_elt, b_elt in zip(a, b)]
>>> c
[6, 6, 6, -3, -3]
Comment

PREVIOUS NEXT
Code Example
Python :: Javascript rendering html 
Python :: how to convert a datatype to another 
Python :: separate words in a text to make a list python 
Python :: matrix diagonal sum leetcode in Python 
Python :: edit models in django admin 
Python :: how to comment text in python 
Python :: calculate quantiles python 
Python :: matplotlib histogram frequency labels 
Python :: Install discord.ui on windows 
Python :: python how to remove n from string 
Python :: statsmodels 
Python :: binary to decimal in python without inbuilt function 
Python :: convert number to char python 
Python :: simple seaborn heatmap 
Python :: python run bat in new cmd window 
Python :: convert string to int dataframe column 
Python :: else if python 
Python :: continue and break in python 
Python :: add timestamp csv python 
Python :: what are test cases in python 
Python :: python insert sorted 
Python :: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 7 supplied. 
Python :: python keyboard hold key 
Python :: python program to check whether a number is even or odd 
Python :: phyton 2.7 convert timedelta to string 
Python :: get discord guild members discord.py 
Python :: numpy arange float step 
Python :: how to use sort in python 
Python :: sphinx autodoc extension 
Python :: opencv webcam 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =