Bubble Gum
While spending the weekend hiking around the beautiful mountains (hills?) of Wales with Angela and Alex I re-discovered the lovely world of bubble gum. Now my jaws hurt but I have a dream - to beat the current bubble world record of 22 and half inches!
Completely unrelated: what's the easiest way to reverse a string? In Python there is a nice trick:
>>> "bubble gum"[::-1]
'mug elbbub'
What if we want to reverse a sentence but not reverse the words?
>>> " ".join("I am a cat".split()[::-1])
'cat a am I'
0 Comments:
Post a Comment
<< Home