In <d9me0ap5s0s28qaeobbh6680gciel6c...@4ax.com> Seymore4Head <Seymore4Head@Hotmail.invalid> writes:
> import math > import random > import sys Why are you importing these modules if they're not used? > b=[] Likewise b is not used. > steve = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89] > for x in steve: > print (steve[x]) As you step through the loop, x becomes each successive item in the 'steve' list. Therefore, you probably want to print just plain x, not steve[x]. > Traceback (most recent call last): > File "C:\Functions\blank.py", line 7, in <module> > print (steve[x]) > IndexError: list index out of range There are fewer than 13 items in steve, so when x reaches 13 this error pops up. -- John Gordon Imagine what it must be like for a real medical doctor to gor...@panix.com watch 'House', or a real serial killer to watch 'Dexter'. -- https://mail.python.org/mailman/listinfo/python-list