Does anyone know what this lines of code stand for ?

_, operation = matrix[i][j]

Specifically I am interested in a dash before the comma. Thank you in advance.

1 Answer 1


De acuerdo a las especificaciones:

Stored in each element of the matrix should be a tuple, (cost, operation), where cost is an int and operation is an Operation.

So what does the line of code mean?. Means that we assign the values of the tuple to two variables but the first of them is ignored, only the second value is of interest to us. Sometimes this technique to ignore specific values is called "I do not care" and is a little-known curiosity of python

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .