Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python multiply list bt number

my_list = [1, 2, 3, 4, 5]
my_new_list = [i * 5 for i in my_list]

>>> print(my_new_list)
[5, 10, 15, 20, 25]
Comment

PREVIOUS NEXT
Code Example
Python :: saving a pandas dataframe as a csv 
Python :: install django windows 
Python :: python print without space 
Python :: how to find largest number in array in python 
Python :: append row to array python 
Python :: python os exists 
Python :: how to add contents of one dict to another in python 
Python :: python how to get alphabet 
Python :: python working directory executed file 
Python :: python how to remove the title of the index from dataframe 
Python :: button in flask 
Python :: python wsgi server 
Python :: decision tree gridsearchcv 
Python :: how to run commands in repl.ot 
Python :: change text color docx-python 
Python :: how to change the datatype of a row in pandas 
Python :: remove duplicates based on two columns in dataframe 
Python :: python search string for word 
Python :: delete turtle 
Python :: remove after and before space python 
Python :: codeforces 677a python solution 
Python :: pandas to dict by row 
Python :: django querset group by sum 
Python :: python print stderr 
Python :: how to execute a cmd command in python 
Python :: forbidden (csrf cookie not set.) django rest framework 
Python :: print random word py 
Python :: hypixel main ip 
Python :: convert torch to numpy 
Python :: convert any base to decimal python 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =