fruits = ['Apple','Mango','Banana','Grapes','Guava']
random.seed(500)
low =0
high = len(fruits)
random_fruits = [fruits[random.randint(low,high)] for i in range(1000)]
This is my code and following is the error what I am getting?
IndexError: list index out of range
Aucun commentaire:
Enregistrer un commentaire