I was wondering how to make a program where the user types a word and then the program jumbles the letters in the word in a random way.
I've thought a lot about this and failed. I made the program below but its not good at all because I want to jumble the letters and this program just randomly
assigns each index one of the letters. This means the same letter can repeat
itself several times, like for example: Input: apple
. Output: ppppp
import random
print('Type a word!')
i = 0
wordJ = ''
word = input()
word = str(word)
while i < len(word):
wordJ = wordJ + word[random.randrange(len(word))]
i = i + 1
print(wordJ)