#4w: Coding in Python {Jumbled Words}

 while 1==1:


    import itertools, english_words

    yourchoices = input(str('Enter letters: '))

    yourchoics = yourchoices.strip()

    yourchoices =yourchoics.lower()

    newwords = []

    word =[]


    for i in yourchoices:

        word.append(i)

    n = 0

    for p in (itertools.permutations(word)):    

        newword=''.join(p)

        

            

        if newword in (english_words.english_words_lower_alpha_set):

            if newword not in (newwords):

                newwords.append(newword)

                



    for k in (newwords):

        print(k)



You can copy-paste this code, if you have English Words library included in your device. Link for the same is here.

Or, you will have to use this code



           






Comments