Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python listas por comprension

>>> numeros = [1, 2, 3, 4]
>>> cuadrados = [num ** 2 for num in numeros]
>>> print(cuadrados)
[1, 4, 9, 16]
Comment

PREVIOUS NEXT
Code Example
Python :: numpy replace all values with another 
Python :: bst deleting 
Python :: iterating with index in for loops python 
Python :: Getting the first element from each list in a column of lists 
Python :: python ordered indexs of a list 
Python :: python set to none 
Python :: Sqlalchemy Define class from existing table 
Python :: pandas select only columns with na 
Python :: unique list 
Python :: how can i aggregate without group by in pandas 
Python :: programmer tool 
Python :: convert iso 8601 to milliseconds python 
Python :: how to create a spark schema using a string 
Python :: numpy concatenate arrays 
Python :: python db access though ssh user 
Python :: get output of a function in a variable python 
Python :: speak by a discord bot in python 
Python :: parser.add_argument array python 
Python :: pandas flip x and y axis 
Python :: compiling python code 
Python :: python resample and interpolate 
Python :: Finding Maximum Elements along columns using Python numpy.argmax() 
Python :: shared SHMEM python 
Python :: python download chromebook 
Python :: Align axis labels in subplots 
Python :: python tkinter importieren 
Python :: pandas fillna by rows 
Python :: how to check python version in script 
Python :: .defaultdict 
Python :: numpy shape 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =