[Edu-sig] Re: Confusion with slice notation
Kirby Urner
urnerk at qwest.net
Mon Jan 5 17:48:09 EST 2004
> However, as Kirby points out, this isn't the only appropriate way to
> teach it. Some people would actually be confused by the model.
>
I like the distances/offset picture just fine, and introduced it complete
with "ascii ruler".
I quote (myself):
============
|<-- 0th -|<--1st --|<-- 2nd -|<-- etc.-|
|---------|---------|---------|---------|---------|---------|---------|
0 1 2 3 4 5 6 7
|--1st -->|--2nd -->|--3rd -->|--etc.-->|
I think it pays to read some about memory storage, fetching and retrieving
from RAM, address bus, data bus, clock bus -- all that inner guts stuff --
to get some sense of it.
============
It's just that
['a','b','c','d'][0:3]
is the same as
[['a','b','c','d'][i] for i in [0,1,2]]
meaning we don't need anything but the start positions on the ruler, to grab
what hangs thereon.
> Besides the issue of learning styles, you have the whole issue of
> computer "readiness" - specific background information - that will
> differ from person to person.
>
Good point to raise.
Kirby
More information about the Edu-sig
mailing list