On Fri, May 24, 2013 at 9:10 PM, Dave Angel <da...@davea.name> wrote:
>
> Is lists[(3,8)]  really so much harder to type than
>     list_3_8  ?

Since a comma creates a tuple, in this context you can just use
lists[3,8] to save a couple more keystrokes.

    >>> from random import Random
    >>> randint = Random(42).randint

    >>> lists = {}
    >>> lists[3,8] = [randint(0,8) for i in range(3)]
    >>> lists
    {(3, 8): [1, 0, 4]}
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to