Skip to main content
deleted 359 characters in body
Source Link
xnor
  • 146.6k
  • 26
  • 279
  • 652

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 38 bytes

lambda n:(range(n)+range(~n%2,n))[::2]

Try it online!

Python 2, 40 bytes

lambda n:[(k-~k)%(n|1)for k in range(n)]

Try it online!

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 38 bytes

lambda n:(range(n)+range(~n%2,n))[::2]

Try it online!

Python 2, 40 bytes

lambda n:[(k-~k)%(n|1)for k in range(n)]

Try it online!

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 40 bytes

lambda n:[(k-~k)%(n|1)for k in range(n)]

Try it online!

added 719 characters in body
Source Link
xnor
  • 146.6k
  • 26
  • 279
  • 652

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 38 bytes

lambda n:(range(n)+range(~n%2,n))[::2]

Try it online!

Python 2, 40 bytes

lambda n:[(k-~k)%(n|1)for k in range(n)]

Try it online!

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!

Python 2, 38 bytes

lambda n:(range(n)+range(~n%2,n))[::2]

Try it online!

Python 2, 40 bytes

lambda n:[(k-~k)%(n|1)for k in range(n)]

Try it online!

Source Link
xnor
  • 146.6k
  • 26
  • 279
  • 652

Python 2, 34 bytes

lambda n:range(1,n,2)+range(0,n,2)

Try it online!