I'm generating a list of random digits, but I'm struggling to figure out how to output the digits in a single row without the square brackets?
import random
def generateAnswer(answerList):listofDigits = []while len(listofDigits) < 5:digit = random.randint(1, 9)if digit not in listofDigits:listofDigits.append(digit)return listofDigitsdef main():listofDigits = []print(generateAnswer(listofDigits))main()