This is my code:
def main():
mycolours = ['R', 'G', 'B', 'Y', 'P', 'O']
myguess = 'RGBY'
total_guess = 5
x = random.shuffle(mycolours[:4])
for i in range(total_guess):
if myguess == x:
print('CORRECT')
else:
print('TRY AGAIN')
main()
Instead of x
returning 4 random strings from the list it returns a value of none.
Aucun commentaire:
Enregistrer un commentaire