[ random shuffle(spamprint(spam[ random shuffle(spamprint(spam[ random shuffle(spamprint(spam[ you want the secret number in bagels to have unique digits the bagels game is much more fun if you don' have duplicate digits in the secret numbersuch as ' or ' the shuffle(function will help you do this getting the secret number from the shuffled digits secretnum 'for in range(numdigits)secretnum +str(numbers[ ]return secretnum the secret number will be string of the first numdigits digits of the shuffled list of integers for exampleif the shuffled list in numbers is [ and numdigits was then you' want the string returned by getsecretnum(to be ' to do thisthe secretnum variable starts out as blank string the for loop on line iterates numdigits number of times on each iteration through the loopthe integer at index is pulled from the shuffled listconverted to stringand concatenated to the end of secretnum for exampleif numbers refers to the list [ ]then on the first iterationnumbers[ (that is will be passed to str()which in turn returns ' which is concatenated to the end of secretnum on the second iterationthe same happens with numbers[ (that is and on the third iteration the same happens with numbers[ (that is the final value of secretnum that is returned is ' notice that secretnum in this function contains stringnot an integer this may seem oddbut remember that you cannot concatenate integers the expression evaluates to but what you want is ' ' ' 'which evaluates to ' post questions to