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

#Pyth, 8 7 bytes

<zh/lz2

Saved 1 with thanks to @Steven H

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. 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