def get_distinct_values(values):
return list(set(filter(lambda x: x != 0, values)))
This code will get a distinct list where values are not equal to zero. I used this code in a Sudoku solver algorithm.
def get_distinct_values(values):
return list(set(filter(lambda x: x != 0, values)))
This code will get a distinct list where values are not equal to zero. I used this code in a Sudoku solver algorithm.
For further actions, you may consider blocking this person and/or reporting abuse
Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.
Sang-moon, Lee -
Yoel Benítez Fonseca -
Kazi Priom -
James -
Top comments (0)