Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python element wise multiplication list

# element-wise multiplication of x & y
>>>x = [1,2,3,4]
>>>y = [2,3,4,5]
>>>[a*b for a,b in zip(x,y)]
[2, 6, 12, 20]
Comment

PREVIOUS NEXT
Code Example
Python :: openpyxl add worksheet 
Python :: pandas to csv float format 
Python :: how to remove all zeros from a list in python 
Python :: python count distinct letters 
Python :: pyperclip 
Python :: urllib.request headers 
Python :: how to check if mouse is over a rect in pygame 
Python :: pandas filter on range of values 
Python :: how to find the cube of a number in python 
Python :: python set a specific datetime 
Python :: calculate integral python 
Python :: python merge two dictionaries 
Python :: pandas absolute value 
Python :: how to draw shape square in python turtle 
Python :: find allurl in text python 
Python :: binary search tree iterator python 
Python :: play music with time in python 
Python :: mad scipy 
Python :: string to ascii value python 
Python :: django static media 
Python :: selenium webdriver 
Python :: remove character python 
Python :: find python version in jupyter notebook 
Python :: remove emoji from dataframe 
Python :: ffmpeg python cut video 
Python :: pretty json python 
Python :: send email with flask 
Python :: json python no whitespace 
Python :: numpy apply function to array 
Python :: generate random number python 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =