Okay copy/paste messed up the indents, try #2:
def findStudent(use rname):
____for i in range(1,len(stu dents)):
________if students[i][0] == username:
________return i
____return -1
User Profile
Collapse
Profile Sidebar
Collapse
Edward Hobbs
Last Activity: May 24 '12, 06:18 PM
Joined: Dec 16 '11
Location:
-
-
IndexError: list index out of range
This is my first post, so please be patient with me.. So i've been coding in python for about a month, and i'm not exactly brilliant, so i'm stumped. The system is a basic login (A-Level work) for a "merit system", however the list cannot get past the first user in the class?
Code:
...Code:def findStudent(username): for i in range(len(students)): if students[i][0] == username:
No activity results to display
Show More
Leave a comment: