flyaflya 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.
>
>
("a") is just a simple expression. You need to add a comma so that
Python knows you want a tuple. Thusly... ("a",)
Will McGugan
--
http://www.willmcgugan.com
"".join({'*':'@','^':'.'}.get(c,0) or chr(97+(ord(c)-84)%26) for c in
"jvyy*jvyyzpthtna^pbz")
--
http://mail.python.org/mailman/listinfo/python-list