You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to reproduce the code on page 107 of the first edition (and it is the same on Github).
When I do indA & indB I get a strange result: [0,3,5, 7,9] while if I use the code set(indA) & set(indB) I get the expected result
{3,5,7}. I also get the same correct result if I use the method indA.intersection(indB).
Likewise, I get funny results with | and ^. while the equivalent set operations and the methods all work.
It is not clear why this is happening, as I have tried it from scratch a few times, to avoid typos
The text was updated successfully, but these errors were encountered:
I am trying to reproduce the code on page 107 of the first edition (and it is the same on Github).
When I do indA & indB I get a strange result: [0,3,5, 7,9] while if I use the code set(indA) & set(indB) I get the expected result
{3,5,7}. I also get the same correct result if I use the method indA.intersection(indB).
Likewise, I get funny results with | and ^. while the equivalent set operations and the methods all work.
It is not clear why this is happening, as I have tried it from scratch a few times, to avoid typos
The text was updated successfully, but these errors were encountered: