On 2018-07-22 00:44, no@none.invalid wrote:
On Sat, 21 Jul 2018 14:34:15 -0700 (PDT), Rick Johnson
<rantingrickjohn...@gmail.com> wrote:

This is really the code I keep copying.

import random
from random import randint
a = [5, 10, 15, 20, 25, 30, 35, 40]
b = ["Rock","Paper","Scissors","Lizard ","Spock"]


I am lazy and don't type well, so I leave out some details when
posting.

I don't know why the program I needed randint for didn't work with
just import random, but I moved on without lingering on it.

When you import 'random', that name refers to the module itself. You can refer to 'randint', which is defined in that module, by writing "random.randint".

Alternatively, as you've done, you can import 'randint' directly from the 'random' module.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to