Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to step or only print every two element of list python

letters = ["a","b","c","d","e","f"]

print(letters[::2])

#output
#['a', 'c', 'e']
Comment

PREVIOUS NEXT
Code Example
Python :: views.py 
Python :: kivy display pil image 
Python :: python requests insecure request warning 
Python :: plotly pdf report 
Python :: standard deviation in python without numpy 
Python :: hierarchy dendrogram 
Python :: sqlite python select with parameters 
Python :: python use variable name as string 
Python :: reshape IML matrix 
Python :: max python 
Python :: syntax of calloc 
Python :: scikit learn random forest 
Python :: python how to make boxplots with swarmplot 
Python :: with torch.no_grad() if condition 
Python :: how to use re.sub 
Python :: convert string to integer in python 
Python :: django swagger 
Python :: index of and last index of in python 
Python :: pandas switch column levels 
Python :: file handling in python append byte 
Python :: django make app 
Python :: different types f python loops 
Python :: turn string into operator python 
Python :: Best Python Free Tutorial 
Python :: str count python 
Python :: expand pandas dataframe into separate rows 
Python :: program to replace lower-case characters with upper-case and vice versa in python 
Python :: python strip() 
Python :: how to iterate row wise using 2d integer array in python 
Python :: python post request multi argument 
ADD CONTENT
Topic
Content
Source link
Name
8+4 =