Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

snippet, python

Name: retard 2010-04-02 14:45

i always get hung up on stupid shit. like, i didn't study my python docs or sicp today, i know. but how do i make this into one line? thx /prog/

        d0=fresult[1][0]-fresult[2][0]
        d1=fresult[1][1]-fresult[2][1]
        d2=fresult[1][2]-fresult[2][2]
        d3=fresult[1][3]-fresult[3][3]

Name: Anonymous 2010-04-02 18:37

>>9
A list comprehension, actually.
A list comprehension is a loop.


Python is the best all-round language there is
( ≖‿≖)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List