Skip to main content
Deleting your response requires reputation?
Source Link
jack
  • 51
  • 2

Python 3:

for i in range(2**n):i^i//2

(Doh. Overlooked that this solutions is already known. Would delete it if stackexchange allowed it)

Python 3:

for i in range(2**n):i^i//2

Python 3:

for i in range(2**n):i^i//2

(Doh. Overlooked that this solutions is already known. Would delete it if stackexchange allowed it)

Source Link
jack
  • 51
  • 2

Python 3:

for i in range(2**n):i^i//2