ram wrote:
> Stupid question #983098403:
>
> I can't seem to pass an unpacked sequence and keyword arguments to a
> function at the same time. What am I doing wrong?
>
> def f(*args, **kw):
> for a in args:
> print 'arg:', a
> for (k,v) in kw.iteritems():
> print k, '=', v
Carl Banks wrote:
> EXI-Andrews, Jack wrote:
>> the '*' and '+' don't seem to be greedy.. they will consume less in
>> order to match a string:
>>
> import re;re.match('(a+)(ab)','aaab').groups()
>> ('aa', 'ab')
>>
>> this is the sort of behaviour i'd expect from
>>'(a+?)(ab)'
>>
>> a+ shou
Ben Finney wrote:
> Really? Where does Python guarantee that the left side *must* be
> evaluated before the right side of a comparison? (If the right side
> were to be evaluated first, the left might end up with a greater
> value.)
>
http://docs.python.org/ref/evalorder.html
--
http://mail.pytho
Robert R. wrote:
> Hello,
>
> i would like to write a piece of code to help me to align some sequence
> of words and suggest me the ordered common subwords of them
>
> s0 = "this is an example of a thing i would like to have".split()
> s1 = "another example of something else i would like to have"
Noah Rawlins wrote:
>
> >>> strList = []
> >>> strList.append('this is an example of a thing i would like to have')
> >>> strList.append('another example of something else i would like to
> have')
> >>> strList.appen