How can I have one element list or tuple?

Neil Cerutti horpner at yahoo.com
Thu Nov 1 12:28:00 EDT 2007


On 2007-11-01, nico <nicolas.berney at gmail.com> wrote:
> The following example returns a string type, but I need a tuple...
>>>> var = ("Hello")
>>>> print type(var)
><type 'str'>
>
> I need that for a method parameter.

var = "hello",

-- 
Neil Cerutti



More information about the Python-list mailing list