On Sat, Feb 5, 2011 at 15:38, Steven D'Aprano
wrote:
> On Sat, 05 Feb 2011 14:38:29 +0100, Daniel Urban wrote:
>
>> On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin
>> wrote:
>>> Hi there,
>>>
>>> How can I do this in a one liner:
>>>
>>> maxCountPerPhraseWordLength = {}
>>> f
On Sat, 05 Feb 2011 14:38:29 +0100, Daniel Urban wrote:
> On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin
> wrote:
>> Hi there,
>>
>> How can I do this in a one liner:
>>
>> maxCountPerPhraseWordLength = {}
>> for i in range(1,MAX_PHRASES_LENGTH+1):
>> maxCountPerP
2011/2/5 Lisa Fritz Barry Griffin :
> Hi there,
>
> How can I do this in a one liner:
>
> maxCountPerPhraseWordLength = {}
> for i in range(1,MAX_PHRASES_LENGTH+1):
> maxCountPerPhraseWordLength[i] = 0
>
> Thanks!
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Lisa Fritz Barry Griffin wrote:
> How can I do this in a one liner:
>
> maxCountPerPhraseWordLength = {}
> for i in range(1,MAX_PHRASES_LENGTH+1):
> maxCountPerPhraseWordLength[i] = 0
You can init a dictionary with zeroes with
d = dict.fromkeys(range(1, MAX_PHRASES_L
On Sat, Feb 5, 2011 at 14:08, Lisa Fritz Barry Griffin
wrote:
> Hi there,
>
> How can I do this in a one liner:
>
> maxCountPerPhraseWordLength = {}
> for i in range(1,MAX_PHRASES_LENGTH+1):
> maxCountPerPhraseWordLength[i] = 0
maxCountPerPhraseWordLength = {0 for i in ra
On Sat, Feb 5, 2011 at 6:38 PM, Lisa Fritz Barry Griffin <
lisaochba...@gmail.com> wrote:
> Hi there,
>
> How can I do this in a one liner:
>
>maxCountPerPhraseWordLength = {}
>for i in range(1,MAX_PHRASES_LENGTH+1):
>maxCountPerPhraseWordLength[i] = 0
>
maxCountPerPhr
Hi there,
How can I do this in a one liner:
maxCountPerPhraseWordLength = {}
for i in range(1,MAX_PHRASES_LENGTH+1):
maxCountPerPhraseWordLength[i] = 0
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list