def mixWord(word): characterList = list(word); print characterList import random; random.shuffle(characterList); print characterList; shuffledWord = ''.join(characterList); print shuffledWord; mixWord("PEBKAC")
Standard input is empty
['P', 'E', 'B', 'K', 'A', 'C'] ['E', 'K', 'P', 'C', 'B', 'A'] EKPCBA
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!