Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how do I create a python list with a negative index

a = []
for i in xrange( -20, 0, -1 ):
    a[i] = -(i)
    log.info('a[{i}]={v}'.format(i=i, v=a[i]))
else:
    log.info('end')
Source by www.codeproject.com #
 
PREVIOUS NEXT
Tagged: #I #create #python #list #negative #index
ADD COMMENT
Topic
Name
3+2 =