fork download
  1. def mixWord(word):
  2. characterList = list(word);
  3. print characterList
  4. import random;
  5. random.shuffle(characterList);
  6. print characterList;
  7. shuffledWord = ''.join(characterList);
  8. print shuffledWord;
  9.  
  10. mixWord("PEBKAC")
Success #stdin #stdout 0.09s 11040KB
stdin
Standard input is empty
stdout
['P', 'E', 'B', 'K', 'A', 'C']
['E', 'K', 'P', 'C', 'B', 'A']
EKPCBA