code: def lcv(var, assignment, csp):
      "Least-constraining-values heuristic."
      return sorted(csp.choices(var),
                    key=lambda val: csp.nconflicts(var, val, assignment)f lcv(var, assignment, csp):
      "Least-constraining-values heuristic."
      return sorted(csp.choices(var),
                    key=lambda val: csp.nconflicts(var, val, assignment))
docs: Least-constraining-values heuristic.