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.
CS50 Stack Exchange is a question and answer site for students of Harvard University's CS50. It only takes a minute to sign up.
Sign up to join this communityDoes 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.
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