Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

list square python

l1 = [1,2,3,4,5]

l2 = [x**2 for x in l1] 
l2
>>> [1,4,9,16,25]
Comment

PREVIOUS NEXT
Code Example
Python :: rounding values in pandas dataframe 
Python :: loop through words in a string python 
Python :: python compare floats 
Python :: pandas create a new column based on condition of two columns 
Python :: set permissions role discord.py 
Python :: variable string in string python 
Python :: how to write a code for anagram in python 
Python :: how to make text change lines pygame 
Python :: pandas normalize columns 
Python :: python return using if 
Python :: python tqdm 
Python :: get scipy version python 
Python :: append to list py 
Python :: how to make my discord bot shut down with a command 
Python :: python tkinter entry hide text 
Python :: extract name of file from path python 
Python :: how to get user id django 
Python :: how to select axis value in python 
Python :: python copy a dictionary to a new variable 
Python :: # find out indexes of element in the list 
Python :: pandas eliminar filas de un dataframe con una condicion 
Python :: how to read hdf5 file in python 
Python :: sum two columns pandas 
Python :: how to convert binary to integer in python 
Python :: Adding labels to histogram bars in matplotlib 
Python :: check if something is nan python 
Python :: generate rsa key python 
Python :: python turtle 
Python :: python string trim 
Python :: how to make button in python 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =