Jose' Matos wrote:
> On Tuesday 10 August 2004 12:23, Angus Leeming wrote:
>> Ok, Jose. The ignorant one strikes again.
>>
>> How do I initialise a list of 25 items to 0?
>> In C++
>> std::vector path_bins(25, 0);
>>
>> In python, I've got:
>>
>> path_bins = []
>> for i in range(0,
In python, I've got:
path_bins = []
for i in range(0, 25):
path_bins.append(0)
path_bins = [0]*25
On Tuesday 10 August 2004 12:23, Angus Leeming wrote:
> Ok, Jose. The ignorant one strikes again.
>
> How do I initialise a list of 25 items to 0?
> In C++
> std::vector path_bins(25, 0);
>
> In python, I've got:
>
> path_bins = []
> for i in range(0, 25):
> path_bins.append
Ok, Jose. The ignorant one strikes again.
How do I initialise a list of 25 items to 0?
In C++
std::vector path_bins(25, 0);
In python, I've got:
path_bins = []
for i in range(0, 25):
path_bins.append(0)
which feels 'sub-optimal' ;-)
--
Angus