Just as everyone said, use ('a',) instead of ('a'). As Steve said there are lots of documentation about it. Check the Library Reference at http://www.python.org/doc/current/lib/typesseq.html#l2h-155 or to make things more clear you could read the tuples section in the tutorial at http://docs.python.org/tut/node7.html#SECTION007300000000000000000

my 2 cents

Regards,
Tiago S Daitx

On 6/5/05, flyaflya <[EMAIL PROTECTED]> wrote:

>>> a = {1: ("a")}
>>> a[1]
'a'
why not ('a')? when
>>> a = {1: ((("a")))}
>>> a[1]
'a'
the result is 'a' too,not ((("a"))).but when use["a"] or ("a","b"),the
tuple is longer than 1, it's no problem.









--
[http://www.flyaflya.com/]
--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to