David wrote:
Hello list,
I thought this was easy even for me, but I was wrong, I guess.
Here is what I want to do: take two random numbers between 1 and 99,
and put them into a list.
[snip]
Or you can use list comprehension:
terms = [random.randint(1, 99) for i in range(2)]
or if you seek terseness:
terms = [random.randint(1, 99) for i in 'ab']
--
Bob Gailer
919-636-4239
Chapel Hill NC
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor