On Sun, Jan 19, 2014 at 9:21 AM, spir wrote:
> I guess (not sure) python optimises access of dicts used as scopes (also of
> object attributes) by interning id-strings and thus beeing able to replace
> them by hash values already computed once for interning, or other numeric
A string object cache
On 01/19/2014 02:59 PM, Mark Lawrence wrote:
On 19/01/2014 13:23, spir wrote:
On 01/18/2014 07:20 PM, Pierre Dagenais wrote:
Hello,
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way o
On 19/01/2014 13:23, spir wrote:
On 01/18/2014 07:20 PM, Pierre Dagenais wrote:
Hello,
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
On 01/18/2014 07:20 PM, Pierre Dagenais wrote:
Hello,
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
("year" + str(1900)) = [0,0] but n
W dniu 2014-01-18 19:20, Pierre Dagenais pisze:
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
("year" + str(1900)) = [0,0] but nothing
W dniu 2014-01-18 19:20, Pierre Dagenais pisze:
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
("year" + str(1900)) = [0,0] but nothing
Pierre Dagenais wrote:
> I wish to fill a list called years[] with a hundred lists called
> year1900[], year1901[], year1902[], ..., year1999[]. That is too much
> typing of course. Any way of doing this in a loop? I've tried stuff like
> ("year" + str(1900)) = [0,0] but nothing works.
> Any solut
One thing to note: I wrote:
year = [0] * 1000
Here's another way to get something equivalent:
year = []
for i in range(1000):
year.append(0)
Here, we do an explicit loop to append those thousand zeros into the
list. We'll end up with the same situation as before: year i
If we wanted to do something with something like:
year0 = 0
year1 = 0
year2 = 0
...
year999 = 0
where we keep a thousand years, and set them all to zero, then you're
right in thinking that having one thousand separate variables is
probably not a viable approach.
We can handl
Hello,
I wish to fill a list called years[] with a hundred lists called
year1900[], year1901[], year1902[], ..., year1999[]. That is too much
typing of course. Any way of doing this in a loop? I've tried stuff like
("year" + str(1900)) = [0,0] but nothing works.
Any solution?
Thank you,
PierreD.
10 matches
Mail list logo