another puzzled newbie
cnetzer at sonic.net
Thu Aug 28 08:09:34 CEST 2003
On Wed, 2003-08-27 at 22:09, Elaine Jackson wrote:
> The analogous thing works fine in interactive mode, but when I put it in a
> script, the function singlePass (below) causes a compile-time error.
A SyntaxError perhaps?
> def singlePass(shuffler,preshuffled,postshuffled):
You forgot a ']' at the end of the line
You don't need the '(' and ')' here. del is a keyword, not a function.
> for i in range(len(shuffler)):
If you want a tuple here, it should be (-1,). It needs the comma.
But, since shuffler is a list, you probably really want [-1].
Chad Netzer <cnetzer at sonic.net>
More information about the Python-list