diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-classes-and-objects-by-building-a-sudoku-solver/660ac44c7eec868220318297.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-classes-and-objects-by-building-a-sudoku-solver/660ac44c7eec868220318297.md index 4b9310e232a..f76fe641bd9 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-classes-and-objects-by-building-a-sudoku-solver/660ac44c7eec868220318297.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-classes-and-objects-by-building-a-sudoku-solver/660ac44c7eec868220318297.md @@ -14,7 +14,10 @@ Modify the `row_str` comprehension to give a string only when the item is not ze The list comprehension assigned to the `row_str` variable should call `str()` on each item `i` in `row` if `i` is truthy, and it should evaluate to `'*'` otherwise. ```js -({ test: () => assert(runPython(`_Node(_code).find_class("Board").find_function("__str__").find_for_loops()[0].find_bodies()[0].find_variable("row_str").find_comp_expr().is_equivalent("str(i) if i else '*'")`)) }) +({ test: () => assert(runPython(` +expressions = ["str(i) if i else '*'","'*' if i == 0 else str(i)","str(i) if i != 0 else '*'"] +node =_Node(_code).find_class("Board").find_function("__str__").find_for_loops()[0].find_bodies()[0].find_variable("row_str").find_comp_expr() +any(node.is_equivalent(expr) for expr in expressions)`)) }) ``` # --seed--