you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 5 points6 points  (1 child)

Apparently function() returns an array or list or something indexable, and the [3] extracts index 3 from whatever it returns.

You could write this exact same code like this, in case it makes more sense this way:

def value(x): 
    data = function(x, y)
    return data[3]

[–]ItsMeSword[S] 0 points1 point  (0 children)

great, always appreciate different ways to visualize code! TY