ron wrote:
> ok, this code is written with vi:
>
> #/usr/bin/env python
>
This should be #! not just #, that makes it a regular comment.
> #foreach.py
>
> myList = [1,2,3,4]
> for index in range(len(myList)):
> myList[index] += 1
> print myList
> ~
>
> here's the result:
>
> ~$ ./foreach
ron wrote:
> So I'm starting to work my way through Alan's online
> book, reading, then typing in code and seeing it work.
> The following is a snippet of code in the Loops
> section. I'm getting an error message.
>
> Here's the code and error message:
>
> myList = [1,2,3,4]
> for index in range(
ron wrote:
> Here's the code and error message:
>
Where?
Is it *gasp* invisdible?
>
>
>
>
>
> Be a PS3 game guru.
> Get your game face on with the latest PS3 news and previews at Yahoo! Games.
> http://videoga
thanks Luke, you folks are awesome!
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
__
ok, this code is written with vi:
#/usr/bin/env python
#foreach.py
myList = [1,2,3,4]
for index in range(len(myList)):
myList[index] += 1
print myList
~
here's the result:
~$ ./foreach.py
./foreach.py: line 3: myList: command not found
./foreach.py: line 4: syntax error near unexpecte
So I'm starting to work my way through Alan's online
book, reading, then typing in code and seeing it work.
The following is a snippet of code in the Loops
section. I'm getting an error message.
Here's the code and error message:
myList = [1,2,3,4]
for index in range(len(myList)):
myList[in
Here's the code and error message:
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121
___