Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

qubesos

# to get index of each element in list using list comprehension
my_list = [1, 2, 3, 4, 5]
[(i,j) for (i,j) in enumerate(my_list)]
Source by cmdlinetips.com #
 
PREVIOUS NEXT
Tagged: #qubesos
ADD COMMENT
Topic
Name
4+8 =