Python and Schools
Andrew Bennetts
andrew-pythonlist at puzzling.org
Wed Apr 16 10:33:46 EDT 2003
On Wed, Apr 16, 2003 at 02:22:02PM +0000, Steve Holden wrote:
[...]
>
> For a real example, consider the contortions I have to go through when
> writing VBScript ASP code for a client's project if I want a list (array) of
> strings. Where in Python I can write:
>
> sarr = ['the', 'quick', 'brown', 'fox', 'jumps' 'over', 'the', 'lazy',
> 'dog]
>
> in VBScript I must resort to one of [nontested code follows]:
>
> dim sarr(9)
> sarr(1) = 'the'
> sarr(2) = 'quick'
> ...
> sarr(8) = 'dog'
>
> or possibly
>
> sarr = split("the quick brown fox jumps over the lazy dog")
Or, if my memory isn't failing me:
sarr = Array("the", "quick", ... "dog")
-Andrew.
More information about the Python-list
mailing list