PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
cont="y"
while cont=="y":
def shuffle(word):
wordlen = len(word)
word = list(word)
for i in range(0,wordlen-1):
pos = randint(i+1,wordlen-1)
word[i], word[pos] = word[pos], word[i]
word = "".join(word)
return word
print (shuffle(word))
cont=input("Continue? y/n").lower()
print("Ended")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run