How could I possibly shorten / clean this up? I suppose mainly clean up the loop at the start asking whether they would like to scramble the code.
def userAnswer(letters): print("Can you make a word from these letters? "+str(letters)+" :") x = input("Would you like to scrample the letters? Enter 1 to scramble or enter to guess :") while x == '1': print(''.join(random.sample(letters,len(letters)))) x = input("Would you like to scrample the letters? Enter 1 to scramble or enter to guess :") word = input("What is your guess? :") word = word.lower() if checkSubset(word, letters) == True and checkWord(word) == True: print("Yes! You can make a word from those letters!") else: print("Sorry, you cannot make that word from those letters") userAnswer("agrsuteod")