teaching for loops before lists (was Re: Range Operation pre-PEP)

Roman Suzi rnd at onego.ru
Thu May 10 13:41:21 CEST 2001


On Thu, 10 May 2001, Alex Martelli wrote:

> "Roman Suzi" <rnd at onego.ru> wrote in message
> news:mailman.989472800.1598.python-list at python.org...
>     ...
> > > > Even recursion could be explained without lists in Python,
> > > > why for-loops need this prerequisite?
> > >
> > > done much python training lately, or are you just making
> >
> > Yes. I taught programming classes a year ago.
> > That is where I had some trouble with for-loops.
> 
> Personally, I've found that for-loops can easily
> be taught without having introduced lists yet,
> because they work on ANY sequence -- and a datatype
> you will surely have introduced VERY early in any
> Python course is "string"!  A string is a sequence.
> This is of limited (though non-null) usefulness in
> most Python use, but it SURE comes in handy when
> teaching Python to a totally-raw beginner...:

Thank you Alex! This idea have not occured to me
(about strings as sequences instead of lists).


Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
 





More information about the Python-list mailing list