#!/usr/bin/python3 # # Take a string of words, and jumble the letters while keeping the # first/last letters the same. # # Humans can still read it. Fascinating. # import sys import random def jumble(phrase): words = phrase.strip().split() print(' '.join(w if len(w) <= 3 else (w[0] + ''.join(random.sample(w[1:-1], len(w)-2)) + w[-1]) for w in words)) if __name__ == '__main__': jumble(sys.argv[1])