DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
3+4 =
Submit