On Wed, Feb 2, 2011 at 10:30 PM, shanti bhushan
wrote:
> Dear All,
>
> funtion "textPosValue " will give me key ,type and pos values from the
> arrays.
> This an embedded application code .
> I want to execute some thing when key ==0 && type ==0 please let me
> if (key ==0 && type
Dear All,
funtion "textPosValue " will give me key ,type and pos values from the
arrays.
This an embedded application code .
I want to execute some thing when key ==0 && type ==0 please let me
know
where to put such code i am getting confused with it
def textPosValue(data):
str_arr1=[" 0",".
Duncan Booth:
> Both this and raj's suggestion create a single sorted list. Your suggestion
> creates two lists: the unsorted one and a separate sorted one. In most
> cases the difference is probably insignificant, but if you have a *lot* of
> values it might make a difference.
The good thing of P
[EMAIL PROTECTED] wrote:
> On Mar 28, 1:57ÿam, raj <[EMAIL PROTECTED]> wrote:
>> To ankit:
>>
>> Well, sort() doesn't return the sorted list. It returns None. Why not
>> this straightforward way?
>> dvals = dict.values()
>> dvals.sort()
>> print dvals
>
> Why not sorted( dict.values() ).
>
If y
On Mar 28, 1:57 am, raj <[EMAIL PROTECTED]> wrote:
> To ankit:
>
> Well, sort() doesn't return the sorted list. It returns None. Why not
> this straightforward way?
> dvals = dict.values()
> dvals.sort()
> print dvals
Why not sorted( dict.values() ).
Can it return the right things from the right
To ankit:
Well, sort() doesn't return the sorted list. It returns None. Why not
this straightforward way?
dvals = dict.values()
dvals.sort()
print dvals
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 28, 5:38 am, [EMAIL PROTECTED] wrote:
> >>> dict = {'M':3, 'R':0, 'S':2}
> >>> print dict
>
> {'S': 2, 'R': 0, 'M': 3}
>
> now if I wanted sorted values in list, i am not able to do this>>> print
> dict.values().sort()
>
> None
>
> it returns None instead of [0, 2, 3]
The sort method works
On Mar 28, 5:38 am, [EMAIL PROTECTED] wrote:
> >>> dict = {'M':3, 'R':0, 'S':2}
> >>> print dict
>
> {'S': 2, 'R': 0, 'M': 3}
>
> now if I wanted sorted values in list, i am not able to do this>>> print
> dict.values().sort()
>
> None
>
> it returns None instead of [0, 2, 3]
Try:
from pprint imp
>>> dict = {'M':3, 'R':0, 'S':2}
>>> print dict
{'S': 2, 'R': 0, 'M': 3}
now if I wanted sorted values in list, i am not able to do this
>>> print dict.values().sort()
None
it returns None instead of [0, 2, 3]
--
http://mail.python.org/mailman/listinfo/python-list