Skip to main content
5 of 8
added 9 characters in body
ElPedro
  • 6.5k
  • 2
  • 24
  • 38

#Pyth, 8 bytes

<z+1/lz2

Not the shortest Pyth answer (by half) but I'm making an effort to learn the language and this is my first post using it (I'm Java/Python/Lotus==vervose background). Posted as much for comments and feedback as anything. It's also the first Pyth program that I have actually got to work :)

Now I just need to work out how the 4 byte answer from @Maltysen works :-)

ElPedro
  • 6.5k
  • 2
  • 24
  • 38