Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python list of difference beetwen values in list

>>> t = [1, 3, 6]
>>> v = [t[i+1]-t[i] for i in range(len(t)-1)]
>>> v
[2, 3]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #list #difference #beetwen #values #list
ADD COMMENT
Topic
Name
6+4 =