Bug report
Bug description:
The following works:
return sum(map(prod,pairwise(c for r in b if (c:=r.count('1')))))
But the following does not work:
return sum(a*b for a,b in pairwise(c for r in b if (c:=r.count('1'))))
The error:
SyntaxError: assignment expression cannot be used in a comprehension iterable expression
^^^^^^^^^^^^^^^
return sum(a*b for a,b in pairwise(c for r in b if (c:=r.count('1'))))
Line 3 (Solution.py)
CPython versions tested on:
3.11
Operating systems tested on:
Linux