dimanche 21 juin 2020

many similarly phrased questions

#when I type this I get an error and I cant figure it out. What I want is a random selection from the list.

import random
movies = ["pulp fiction", "peter pan", "toy story"]
watch = random.choice[movies]

TypeError Traceback (most recent call last) in () ----> 1 watch = random.choice[movies]

TypeError: 'method' object is not subscriptable




Aucun commentaire:

Enregistrer un commentaire