Retreiving a single number from a list of numbers ?

Peter Moscatt pmoscatt at bigpond.net.au
Thu Jul 19 11:25:48 CEST 2001


Thanks Terry,

Actually this would be the better way of getting what I actially need, but 
Alex's info was also excellent.

Thanks mate.....


Pete


Terry Reedy wrote:

>> I am trying to extract a value from a variable that contains more than
> one
>> value.
>>
>> For example:
>>     If  I assigned the result of wxGetClientDisplayRect() to the var 'a'
>> like:
>>         a = wxGetClientDisplayRect()
>>
>> the 'a' would return something like (0, 0, 800. 540)
>>
>> How then would I assign the 800 from 'a' and give it to a var called 'b'
> ??
> 
> b=a[2]
> 
> But you might want something like
> 
> x1,y1, x2,y2 = wxGetClientDisplayRect()
> 
> to unpack all 4 values of the tuple into individual vars.
> 
> Terry J. Reedy
> 
> 
> 
> 




More information about the Python-list mailing list