To use the random.randint method I can use the following two options:
import random
# one way to use random
random.randint(1,10)
# second way with instanciating first
instance = random.Random()
instance.randint(1,10)
Why can I use the first way although I did not instantiate an instance yet?
Aucun commentaire:
Enregistrer un commentaire