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] >>> [j-i for i, j in zip(t[:-1], t[1:])] # or use itertools.izip in py2k [2, 3]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#list
#difference
#beetwen
#values
#list
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit