This formating is really tricky

Rustom Mody rustompmody at gmail.com
Mon Aug 25 17:05:01 EDT 2014


On Tuesday, August 26, 2014 1:44:40 AM UTC+5:30, Seymore4Head wrote:
> BTW the exercise instructions say to use the choice function.  I
> assume I had to include all the numbers to choose from instead of
> picking a random number from 1-53 or 1-42.

> I included my shortcut for pb2.  It doesn't work?  Is there a short to
> prevent from listing each number?

Yeah I guess googling for that will not work well if you say "listing each 
number"

$ python
Python 2.7.8 (default, Aug 10 2014, 16:19:34) 
[GCC 4.9.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> range(1,54)
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53]


It may help to do
>>> help(range)



More information about the Python-list mailing list